From 765d043cc0626db895683196652187ba65408131 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Fri, 24 Sep 2021 09:21:32 +0200 Subject: [PATCH] mod+lncli: remove deprecated package [skip ci] The use of golang.org/x/crypto/ssh/terminal was marked as deprecated since that code was moved to its own repo golang.org/x/term. With this commit we use the new package name directly, which was already pulled in under its new name anyway. --- cmd/lncli/main.go | 4 ++-- go.mod | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/lncli/main.go b/cmd/lncli/main.go index 83b9d1df5..05fbbae34 100644 --- a/cmd/lncli/main.go +++ b/cmd/lncli/main.go @@ -19,7 +19,7 @@ import ( "github.com/lightningnetwork/lnd/macaroons" "github.com/urfave/cli" - "golang.org/x/crypto/ssh/terminal" + "golang.org/x/term" "google.golang.org/grpc" "google.golang.org/grpc/credentials" ) @@ -406,7 +406,7 @@ func readPassword(text string) ([]byte, error) { // The variable syscall.Stdin is of a different type in the Windows API // that's why we need the explicit cast. And of course the linter // doesn't like it either. - pw, err := terminal.ReadPassword(int(syscall.Stdin)) // nolint:unconvert + pw, err := term.ReadPassword(int(syscall.Stdin)) // nolint:unconvert fmt.Println() return pw, err } diff --git a/go.mod b/go.mod index 4afc87c20..1da576bdf 100644 --- a/go.mod +++ b/go.mod @@ -60,6 +60,7 @@ require ( golang.org/x/net v0.0.0-20210913180222-943fd674d43e golang.org/x/sync v0.0.0-20210220032951-036812b2e83c golang.org/x/sys v0.0.0-20210915083310-ed5796bab164 // indirect + golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba google.golang.org/grpc v1.38.0 google.golang.org/protobuf v1.26.0