switch to term package

This commit is contained in:
Aaron Bieber 2021-12-10 15:49:52 -07:00
parent a86c07b5e8
commit 0ea90c5ddd
2 changed files with 3 additions and 3 deletions

2
go.mod
View File

@ -6,6 +6,6 @@ require (
golang.org/x/crypto v0.0.0-20211202192323-5770296d904e
golang.org/x/net v0.0.0-20211205041911-012df41ee64c
golang.org/x/sys v0.0.0-20211205182925-97ca703d548d // indirect
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211
suah.dev/protect v1.2.0
)

View File

@ -20,8 +20,8 @@ import (
"time"
"golang.org/x/crypto/bcrypt"
"golang.org/x/crypto/ssh/terminal"
"golang.org/x/net/webdav"
"golang.org/x/term"
"suah.dev/protect"
)
@ -162,7 +162,7 @@ func prompt(prompt string, secure bool) (string, error) {
fmt.Print(prompt)
if secure {
b, err := terminal.ReadPassword(int(os.Stdin.Fd()))
b, err := term.ReadPassword(int(os.Stdin.Fd()))
if err != nil {
return "", err
}