Forwarded: https://github.com/go-godo/godo/pull/64 From: Simon Josefsson Date: Sat, 28 Mar 2026 09:42:57 +0100 Subject: [PATCH] Avoid howeyc/gopass diff --git a/exec.go b/exec.go index e79be30..06554be 100644 --- a/exec.go +++ b/exec.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - "github.com/howeyc/gopass" + "golang.org/x/term" "github.com/mgutz/str" "github.com/nozzle/throttler" "gopkg.in/godo.v2/util" @@ -297,7 +297,7 @@ func Prompt(prompt string) string { // PromptPassword prompts user for password input. func PromptPassword(prompt string) string { fmt.Printf(prompt) - b, err := gopass.GetPasswd() + b, err := term.ReadPassword(int(os.Stdin.Fd())) if err != nil { fmt.Println(err.Error()) return "" diff --git a/util/prompt.go b/util/prompt.go index f7b030c..7589887 100644 --- a/util/prompt.go +++ b/util/prompt.go @@ -5,7 +5,7 @@ import ( "fmt" "os" - "github.com/howeyc/gopass" + "golang.org/x/term" ) // Prompt prompts user for input with default value. @@ -19,7 +19,7 @@ func Prompt(prompt string) string { // PromptPassword prompts user for password input. func PromptPassword(prompt string) string { fmt.Printf(prompt) - b, err := gopass.GetPasswd() + b, err := term.ReadPassword(int(os.Stdin.Fd())) if err != nil { fmt.Println(err.Error()) return ""