aboutsummaryrefslogtreecommitdiff
path: root/ask
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2017-05-01 01:25:41 +0200
committerDimitri Sokolyuk <demon@dim13.org>2017-05-01 01:25:41 +0200
commit762de8ec863f7a5a56867efbf77ea7cc0386135d (patch)
tree7f3151cbe9652141bf1d47599b22e15cc8265485 /ask
parentc6f42151d91e3fd1f7645917d4925c084082b015 (diff)
lint
Diffstat (limited to 'ask')
-rw-r--r--ask/ask.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/ask/ask.go b/ask/ask.go
index 9a45b30..86dfa6d 100644
--- a/ask/ask.go
+++ b/ask/ask.go
@@ -1,3 +1,4 @@
+// Package ask implements interactive password retrieval
package ask
import (
@@ -12,6 +13,7 @@ var (
ErrNoMatch = errors.New("passwords don't match")
)
+// Confirmed asks for password twice
func Confirmed() (string, error) {
pass, err := ask(os.Stdin, "passphrase: ")
if err != nil {
@@ -27,6 +29,7 @@ func Confirmed() (string, error) {
return pass, nil
}
+// Password ask for password once
func Password() (string, error) {
return ask(os.Stdin, "passphrase: ")
}