diff --git a/cmd/hash.go b/cmd/hash.go index d06b1fe..d421416 100644 --- a/cmd/hash.go +++ b/cmd/hash.go @@ -10,7 +10,7 @@ import ( "github.com/screego/server/logger" "github.com/urfave/cli" "golang.org/x/crypto/bcrypt" - "golang.org/x/crypto/ssh/terminal" + "golang.org/x/term" ) var hashCmd = cli.Command{ @@ -30,7 +30,7 @@ var hashCmd = cli.Command{ if len(pass) == 0 { var err error _, _ = fmt.Fprint(os.Stderr, "Enter Password: ") - pass, err = terminal.ReadPassword(int(syscall.Stdin)) + pass, err = term.ReadPassword(int(syscall.Stdin)) if err != nil { log.Fatal().Err(err).Msg("could not read stdin") } diff --git a/go.mod b/go.mod index 166c992..06ccd6f 100644 --- a/go.mod +++ b/go.mod @@ -19,6 +19,7 @@ require ( github.com/stretchr/testify v1.7.0 github.com/urfave/cli v1.22.5 golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871 + golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 ) require ( @@ -41,7 +42,6 @@ require ( github.com/russross/blackfriday/v2 v2.0.1 // indirect github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e // indirect - golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 // indirect google.golang.org/protobuf v1.26.0-rc.1 // indirect gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect )