From 8e5def8c2e3e4ff347b1f60eb5f6007dae1bbd0a Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 1 Nov 2024 11:31:40 +0200 Subject: add the .soon tag, and some refactor --- internal/prompt/prompt.go | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'internal/prompt') 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 -- cgit v1.2.3