aboutsummaryrefslogtreecommitdiff
path: root/ui/input.go
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@protonmail.ch>2022-06-15 00:08:39 +0530
committerVidhu Kant Sharma <vidhukant@protonmail.ch>2022-06-15 00:08:39 +0530
commit028632de277704fe4576e732d4997daa70f25f60 (patch)
tree343137fc2b19cb7c9568324a9529218ca6065e49 /ui/input.go
parent5ac21806f34a7c88d2685420d53cbd585f4b4f3d (diff)
added color coding and error handling + other visual appeal
Diffstat (limited to 'ui/input.go')
-rw-r--r--ui/input.go6
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