switch to term package
This commit is contained in:
parent
a86c07b5e8
commit
0ea90c5ddd
2
go.mod
2
go.mod
@ -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
|
||||
)
|
||||
|
4
main.go
4
main.go
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user