Stub out ReadPassword on plan9 and solaris to fix compilation

This commit is contained in:
Nick Craig-Wood
2016-02-21 10:31:53 +00:00
parent ea11f5ff3d
commit 700e47d6e2
3 changed files with 38 additions and 12 deletions

View File

@@ -28,7 +28,6 @@ import (
"github.com/mreiferson/go-httpclient"
"github.com/spf13/pflag"
"golang.org/x/crypto/nacl/secretbox"
"golang.org/x/crypto/ssh/terminal"
"golang.org/x/text/unicode/norm"
)
@@ -537,17 +536,6 @@ func ReadLine() string {
return strings.TrimSpace(line)
}
// ReadPassword reads a password
// without echoing it to the terminal.
func ReadPassword() string {
line, err := terminal.ReadPassword(int(os.Stdin.Fd()))
fmt.Println("")
if err != nil {
log.Fatalf("Failed to read password: %v", err)
}
return strings.TrimSpace(string(line))
}
// Command - choose one
func Command(commands []string) byte {
opts := []string{}