From b06f25281f22eae33839a349bc3dd26ed403b4c6 Mon Sep 17 00:00:00 2001 From: Parsa Yousefi Date: Thu, 5 Sep 2024 15:58:30 +0200 Subject: [PATCH] replace deprecated dependency The term part was moved to a separate library. --- cmd/monfront/main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/monfront/main.go b/cmd/monfront/main.go index 2fcf15b..c56dafd 100644 --- a/cmd/monfront/main.go +++ b/cmd/monfront/main.go @@ -20,7 +20,7 @@ import ( "github.com/BurntSushi/toml" "github.com/lib/pq" - "golang.org/x/crypto/ssh/terminal" + "golang.org/x/term" ) var ( @@ -72,7 +72,7 @@ func main() { switch flag.Arg(0) { case "pwgen": fmt.Printf("enter password: ") - pw, err := terminal.ReadPassword(0) + pw, err := term.ReadPassword(0) fmt.Println() if err != nil { log.Fatalf("could not read password: %s", err) @@ -94,7 +94,7 @@ func main() { log.Fatalf("config '%s' is world readable!", *configPath) } - raw, err := ioutil.ReadFile(*configPath) + raw, err := os.ReadFile(*configPath) if err != nil { log.Fatalf("could not read config: %s", err) }