aboutsummaryrefslogtreecommitdiffstats
path: root/input/prompt.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2019-02-23 13:01:46 +0100
committerMichael Muré <batolettre@gmail.com>2019-03-01 22:40:28 +0100
commitb8caddddc7aaf34b2da61c590fd1d9a0fae024fb (patch)
tree05871cd66dd4ae9a02f4221b6a8c235931e93074 /input/prompt.go
parent719303226096c905e602cb620dfdfbcf8fe106ad (diff)
downloadgit-bug-b8caddddc7aaf34b2da61c590fd1d9a0fae024fb.tar.gz
identity: some UX cleanup
Diffstat (limited to 'input/prompt.go')
-rw-r--r--input/prompt.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/input/prompt.go b/input/prompt.go
index 7a059b1a..6036c062 100644
--- a/input/prompt.go
+++ b/input/prompt.go
@@ -18,9 +18,9 @@ func PromptValueRequired(name string, preValue string) (string, error) {
func promptValue(name string, preValue string, required bool) (string, error) {
for {
if preValue != "" {
- fmt.Printf("%s [%s]: ", name, preValue)
+ _, _ = fmt.Fprintf(os.Stderr, "%s [%s]: ", name, preValue)
} else {
- fmt.Printf("%s: ", name)
+ _, _ = fmt.Fprintf(os.Stderr, "%s: ", name)
}
line, err := bufio.NewReader(os.Stdin).ReadString('\n')
@@ -35,7 +35,7 @@ func promptValue(name string, preValue string, required bool) (string, error) {
}
if required && line == "" {
- fmt.Printf("%s is empty\n", name)
+ _, _ = fmt.Fprintf(os.Stderr, "%s is empty\n", name)
continue
}