-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Open
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Description
What version of Go are you using (go version
)?
$ go version go version go1.12.1 darwin/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env
)?
Linux and macOS
What did you do?
Tried to use the following code to read passwords (from https://qiita.com/moutend/items/12d53750363edbbc3d6b):
package main
import (
"fmt"
"log"
"syscall"
"golang.org/x/crypto/ssh/terminal"
)
func main() {
fmt.Print("Password: ")
password, err := terminal.ReadPassword(int(syscall.Stdin))
if err != nil {
log.Fatal(err)
} else {
fmt.Printf("\nYour password is %v\n", string(password))
}
}
What did you expect to see?
If I press Ctrl+C at the point when I'm supposed to enter password I'm expecting my terminal back working as before running the code.
What did you see instead?
I'm unable to see what I'm typing anymore as echo is kept disabled
Metadata
Metadata
Assignees
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.