summaryrefslogtreecommitdiff
path: root/internal/prompt
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2024-11-01 11:31:40 +0200
committerPaul Buetow <paul@buetow.org>2024-11-01 11:31:40 +0200
commit8e5def8c2e3e4ff347b1f60eb5f6007dae1bbd0a (patch)
tree29c97b7f340811cdb7e9e2d63a8554d66cdbdc17 /internal/prompt
parent9581ebeb48c48425f2f8f5160455f26dcdc0c550 (diff)
add the .soon tag, and some refactor
Diffstat (limited to 'internal/prompt')
-rw-r--r--internal/prompt/prompt.go16
1 files changed, 10 insertions, 6 deletions
diff --git a/internal/prompt/prompt.go b/internal/prompt/prompt.go
index ab09d4b..df0c256 100644
--- a/internal/prompt/prompt.go
+++ b/internal/prompt/prompt.go
@@ -11,14 +11,18 @@ import (
var (
Info1 = color.New(color.FgCyan, color.BgBlue, color.Bold).PrintfFunc()
Info2 = color.New(color.FgHiYellow, color.BgHiBlack, color.Bold).PrintfFunc()
- Ack = color.New(color.FgHiBlack, color.BgHiGreen, color.Bold).PrintfFunc()
- Warn = color.New(color.FgBlack, color.BgHiYellow, color.Bold).PrintfFunc()
+ INfo3 = color.New(color.FgHiBlack, color.BgHiGreen, color.Bold).PrintfFunc()
+ Ack = color.New(color.FgBlack, color.BgHiYellow, color.Bold).PrintfFunc()
)
-func Acknowledge(message, content string) error {
- Info1(content)
- fmt.Print("\n")
- Ack(message + " (press enter)")
+func Acknowledge(messages ...string) error {
+ if len(messages) > 1 {
+ for _, content := range messages[1:] {
+ Info1(content)
+ fmt.Print("\n")
+ }
+ }
+ Ack(messages[0] + " (press enter to acknowlege)")
reader := bufio.NewReader(os.Stdin)
if _, err := reader.ReadString('\n'); err != nil {
return err