avoid syscall

This commit is contained in:
davidnewhall2 2020-06-28 06:15:50 -07:00
parent 0d1285f1e0
commit f1738c2aa6
1 changed files with 2 additions and 2 deletions

View File

@ -2,9 +2,9 @@ package poller
import ( import (
"fmt" "fmt"
"os"
"strconv" "strconv"
"strings" "strings"
"syscall"
"golang.org/x/crypto/bcrypt" "golang.org/x/crypto/bcrypt"
"golang.org/x/crypto/ssh/terminal" "golang.org/x/crypto/ssh/terminal"
@ -41,7 +41,7 @@ func (u *UnifiPoller) PrintPasswordHash() (err error) {
if u.Flags.HashPW == "-" { if u.Flags.HashPW == "-" {
fmt.Print("Enter Password: ") fmt.Print("Enter Password: ")
pwd, err = terminal.ReadPassword(int(syscall.Stdin)) pwd, err = terminal.ReadPassword(int(os.Stdin.Fd()))
if err != nil { if err != nil {
return err return err
} }