From 40e0295f4cce9e42a40384f7bc2eb6806171ff58 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Wed, 19 Apr 2017 14:41:08 +0200 Subject: kiss --- ask.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'ask.go') diff --git a/ask.go b/ask.go index df8f62e..c439bb5 100644 --- a/ask.go +++ b/ask.go @@ -12,10 +12,8 @@ var ( ErrNoMatch = errors.New("passwords don't match") ) -func AskPassword(f *os.File, confirm bool) (string, error) { - if f == nil { - f = os.Stdin - } +func AskPassword(confirm bool) (string, error) { + f := os.Stdin fd := f.Fd() oldState, err := terminal.MakeRaw(int(fd)) -- cgit v1.2.3