summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2024-10-21 10:38:13 +0300
committerPaul Buetow <paul@buetow.org>2024-10-21 10:38:13 +0300
commit2e343d5e21bb345a89d6886b891b0772cf07f9dd (patch)
tree030428231d09039aeedc5f86f5320b7dee53d58f
parent24065dddf2c79f9823699b0c4dfb776a365d949f (diff)
color
-rw-r--r--internal/prompt/prompt.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/internal/prompt/prompt.go b/internal/prompt/prompt.go
index 6eecf60..fb5b870 100644
--- a/internal/prompt/prompt.go
+++ b/internal/prompt/prompt.go
@@ -14,20 +14,20 @@ import (
var (
ErrAborted = errors.New("aborted")
ErrEditContent = errors.New("edit content")
- blue = color.New(color.FgCyan, color.BgBlue, color.Bold).PrintfFunc()
- red = color.New(color.FgWhite, color.BgRed, color.Bold).PrintfFunc()
+ info = color.New(color.FgCyan, color.BgBlue, color.Bold).PrintfFunc()
+ ack = color.New(color.FgHiBlack, color.BgHiGreen, color.Bold).PrintfFunc()
)
func DoYouWantThis(question, content string) error {
- blue(content)
+ info(content)
fmt.Print("\n")
return whatNow(question)
}
func Acknowledge(message, content string) error {
- blue(content)
+ info(content)
fmt.Print("\n")
- red(message + " (press enter)")
+ ack(message + " (press enter)")
reader := bufio.NewReader(os.Stdin)
if _, err := reader.ReadString('\n'); err != nil {
return err
@@ -39,7 +39,7 @@ func whatNow(question string) error {
reader := bufio.NewReader(os.Stdin)
for {
- red("%s (y=yes/n=no/e=edit):", question)
+ ack("%s (y=yes/n=no/e=edit):", question)
input, err := reader.ReadString('\n')
if err != nil {
fmt.Println("Error reading input:", err)