getpasswd functionality in Go?

The following is one of best ways to get it done. First get term package by go get golang.org/x/term package main import ( “bufio” “fmt” “os” “strings” “syscall” “golang.org/x/term” ) func main() { username, password, _ := credentials() fmt.Printf(“Username: %s, Password: %s\n”, username, password) } func credentials() (string, string, error) { reader := bufio.NewReader(os.Stdin) fmt.Print(“Enter … Read more