diff --git a/README.md b/README.md index f39e075..2b1653d 100644 --- a/README.md +++ b/README.md @@ -8,4 +8,3 @@ or LSF Served Fabulously - tests - webapi - wrap errors correctly. run cmd/lsf without an internet connection and get inspired by the standard libary -- username/password prompt stderr diff --git a/cmd/lsf/main.go b/cmd/lsf/main.go index f7432a4..6e4c347 100644 --- a/cmd/lsf/main.go +++ b/cmd/lsf/main.go @@ -74,7 +74,7 @@ func sessionNeeded() { func readUsername() (string, error) { var username string - fmt.Print("Username: ") + fmt.Fprint(os.Stderr, "Username: ") _, err := fmt.Scanf("%s", &username) if err != nil { return "", errors.Wrap(err, "could not read username") @@ -84,12 +84,12 @@ func readUsername() (string, error) { func readPassword() (string, error) { var password string - fmt.Print("Password: ") + fmt.Fprint(os.Stderr, "Password: ") b, err := terminal.ReadPassword(int(syscall.Stdin)) if err != nil { return "", err } - fmt.Print("\n") + fmt.Fprint(os.Stderr, "\n") password = string(b) return password, nil }