From 41c0c1a9146b0aacebf990d00da4e425c91db578 Mon Sep 17 00:00:00 2001 From: Shulhan Date: Sun, 7 Aug 2022 01:13:52 +0700 Subject: all: replace golang.org/x/crypto/ssh/terminal with golang.org/x/term The golang.org/x/crypto/ssh/terminal has been deprecated. --- cli.go | 4 ++-- go.mod | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/cli.go b/cli.go index c9cccf4..34941b4 100644 --- a/cli.go +++ b/cli.go @@ -16,7 +16,7 @@ import ( "github.com/shuLhan/share/lib/totp" "golang.org/x/crypto/ssh" - "golang.org/x/crypto/ssh/terminal" + "golang.org/x/term" ) //go:embed README.adoc @@ -116,7 +116,7 @@ func (cli *Cli) loadPrivateKey(privateKeyFile string, pass []byte) ( stdin = int(os.Stdin.Fd()) - pass, err = terminal.ReadPassword(stdin) + pass, err = term.ReadPassword(stdin) fmt.Println() if err != nil { return nil, fmt.Errorf(`%s %q: %w`, logp, privateKeyFile, err) diff --git a/go.mod b/go.mod index 6d2eb73..c1423eb 100644 --- a/go.mod +++ b/go.mod @@ -8,11 +8,9 @@ go 1.18 require ( github.com/shuLhan/share v0.40.0 golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa + golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 ) -require ( - golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect - golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 // indirect -) +require golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect //replace github.com/shuLhan/share => ../share -- cgit v1.3