aboutsummaryrefslogtreecommitdiff
path: root/ask.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2017-04-19 14:41:08 +0200
committerDimitri Sokolyuk <demon@dim13.org>2017-04-19 14:41:08 +0200
commit40e0295f4cce9e42a40384f7bc2eb6806171ff58 (patch)
tree99bae4206871eb26c2749fa4a5a05452368f6759 /ask.go
parente913ae859b4324fe11b0256b9520ff4f51e7498a (diff)
kiss
Diffstat (limited to 'ask.go')
-rw-r--r--ask.go6
1 files changed, 2 insertions, 4 deletions
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))