aboutsummaryrefslogtreecommitdiffstats
path: root/input
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2020-01-12 16:38:16 +0100
committerMichael Muré <batolettre@gmail.com>2020-02-08 17:18:28 +0100
commitae2f942ef907161af0aba5f3511db72cf9801dca (patch)
tree899e9a2d93d3d4be3b700f5763b7bc158c24ff30 /input
parent26f0152384f77d2bfd16c6762f5618bc966809a6 (diff)
downloadgit-bug-ae2f942ef907161af0aba5f3511db72cf9801dca.tar.gz
more wip
Diffstat (limited to 'input')
-rw-r--r--input/prompt.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/input/prompt.go b/input/prompt.go
index c7887abb..960ecd62 100644
--- a/input/prompt.go
+++ b/input/prompt.go
@@ -14,6 +14,8 @@ import (
)
// PromptValidator is a validator for a user entry
+// If complaint is "", value is considered valid, otherwise it's the error reported to the user
+// If err != nil, a terminal error happened
type PromptValidator func(name string, value string) (complaint string, err error)
// Required is a validator preventing a "" value