Skip to content

Commit

Permalink
Update terminal password prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
zachhuff386 committed Jul 27, 2024
1 parent 4d4dc4a commit 642a6c7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cli/terminal/terminal_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"golang.org/x/term"
)

func ReadPassword() string {
fmt.Print("Password: ")
func ReadPassword(prompt string) string {
fmt.Print(prompt + ": ")

passwordByt, err := term.ReadPassword(syscall.Stdin)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions cli/terminal/terminal_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"golang.org/x/term"
)

func ReadPassword() string {
fmt.Print("Password: ")
func ReadPassword(prompt string) string {
fmt.Print(prompt + ": ")

passwordByt, err := term.ReadPassword(syscall.Stdin)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions cli/terminal/terminal_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"os"
)

func ReadPassword() string {
fmt.Print("Password: ")
func ReadPassword(prompt string) string {
fmt.Print(prompt + ": ")

password := ""
_, err := fmt.Scanln(&password)
Expand Down

0 comments on commit 642a6c7

Please sign in to comment.