aboutsummaryrefslogtreecommitdiff
path: root/ask.go
diff options
context:
space:
mode:
Diffstat (limited to 'ask.go')
-rw-r--r--ask.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/ask.go b/ask.go
index 2215877..ce0bf91 100644
--- a/ask.go
+++ b/ask.go
@@ -12,7 +12,10 @@ var (
ErrNoMatch = errors.New("passwords don't match")
)
-func AskPassword(confirm bool) (string, error) {
+func AskConfirmed() (string, error) { return askPassword(true) }
+func AskPassword() (string, error) { return askPassword(false) }
+
+func askPassword(confirm bool) (string, error) {
f := os.Stdin
fd := f.Fd()