From 681ecaf7461a080ffab78dc292e3f81b1afe3571 Mon Sep 17 00:00:00 2001 From: David Newhall II Date: Mon, 15 Mar 2021 00:55:54 -0700 Subject: [PATCH] fix package --- core/poller/commands.go | 4 ++-- core/poller/go.mod | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/poller/commands.go b/core/poller/commands.go index 95aaebc3..e9b9f032 100644 --- a/core/poller/commands.go +++ b/core/poller/commands.go @@ -7,7 +7,7 @@ import ( "strings" "golang.org/x/crypto/bcrypt" - "golang.org/x/crypto/ssh/terminal" + "golang.org/x/term" ) // PrintRawMetrics prints raw json from the UniFi Controller. This is currently @@ -41,7 +41,7 @@ func (u *UnifiPoller) PrintPasswordHash() (err error) { if u.Flags.HashPW == "-" { fmt.Print("Enter Password: ") - pwd, err = terminal.ReadPassword(int(os.Stdin.Fd())) + pwd, err = term.ReadPassword(int(os.Stdin.Fd())) if err != nil { return fmt.Errorf("reading stdin: %w", err) } diff --git a/core/poller/go.mod b/core/poller/go.mod index 6c8384cd..5da23aa1 100644 --- a/core/poller/go.mod +++ b/core/poller/go.mod @@ -5,6 +5,7 @@ go 1.15 require ( github.com/spf13/pflag v1.0.6-0.20201009195203-85dd5c8bc61c golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b + golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 golift.io/cnfg v0.0.7 golift.io/version v0.0.2 )