From 06a1e9b13f5f6ba6e7bc6132f8f701922ea7433c Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Fri, 8 Oct 2021 11:32:51 +0900 Subject: [PATCH] Update example code to use `x/term` instead of `x/crypto/ssh/terminal` Because `x/crypto/ssh/terminal` is deprecated and moved to `x/term`. https://pkg.go.dev/golang.org/x/crypto/ssh/terminal#pkg-overview --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ccd807e..44af272 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ func main() { } ``` -### `golang.org/x/crypto/ssh/terminal` example +### `golang.org/x/term` example ```go package main @@ -66,13 +66,13 @@ package main import ( "fmt" - "golang.org/x/crypto/ssh/terminal" + "golang.org/x/term" expect "github.com/Netflix/go-expect" ) func getPassword(fd int) string { - bytePassword, _ := terminal.ReadPassword(fd) + bytePassword, _ := term.ReadPassword(fd) return string(bytePassword) }