From b8caddddc7aaf34b2da61c590fd1d9a0fae024fb Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Sat, 23 Feb 2019 13:01:46 +0100 Subject: identity: some UX cleanup --- input/prompt.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'input') 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 } -- cgit