diff options
author | Vidhu Kant Sharma <vidhukant@protonmail.ch> | 2022-06-15 00:08:39 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <vidhukant@protonmail.ch> | 2022-06-15 00:08:39 +0530 |
commit | 028632de277704fe4576e732d4997daa70f25f60 (patch) | |
tree | 343137fc2b19cb7c9568324a9529218ca6065e49 /ui/input.go | |
parent | 5ac21806f34a7c88d2685420d53cbd585f4b4f3d (diff) |
added color coding and error handling + other visual appeal
Diffstat (limited to 'ui/input.go')
-rw-r--r-- | ui/input.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/input.go b/ui/input.go index bd7306b..0aa2f06 100644 --- a/ui/input.go +++ b/ui/input.go @@ -20,7 +20,8 @@ package ui import ( "errors" - "log" + "fmt" + "os" p "github.com/manifoldco/promptui" ) @@ -39,7 +40,8 @@ func TextInput(label, errMessage string) string { res, err := prompt.Run() if err != nil { - log.Fatal("Failed to run TextInput Prompt.") + fmt.Println("Failed to run TextInput Prompt.", err.Error()) + os.Exit(1) } return res |