diff --git a/ansi.go b/ansi.go index 2bf21eb..8c54ada 100644 --- a/ansi.go +++ b/ansi.go @@ -39,18 +39,7 @@ func Format(codes ...string) string { var str strings.Builder for _, code := range codes { - str.WriteString(string(code)) - } - - return str.String() -} - -func Color(colors ...Colors) string { - - var str strings.Builder - - for _, color := range colors { - str.WriteString(color) + str.WriteString(code) } return str.String() diff --git a/confirmation/confirmation.go b/confirmation/confirmation.go index 7167599..9a0b06f 100644 --- a/confirmation/confirmation.go +++ b/confirmation/confirmation.go @@ -28,8 +28,8 @@ func New(data InputData) (*bool, error) { fmt.Printf( tui.Format(tui.FmtBold, tui.FgColorGrey) + "[" + tui.FgColorGold + "!" + tui.FgColorGrey + "]" + tui.FmtReset + " " + - data.Question + - "(" + tui.FgColorGreen + "y" + tui.FmtReset + "/" + tui.FgColorRed + "n" + tui.FmtReset + "\n " + + data.Question + " " + + "(" + tui.FgColorGreen + "y" + tui.FmtReset + "/" + tui.FgColorRed + "n" + tui.FmtReset + ") " + tui.FgColorGrey + ">>" + tui.Format(tui.FmtItalic, tui.FgColorGold) + "\n", ) //fmt.Printf("\033[1m\033[38;5;247m[\033[38;5;214m?\033[38;5;247m]\033[0m %s (\033[38;5;34my\033[0m/\033[38;5;167mn\033[0m) \033[38;5;247m>>\033[3m\033[38;5;214m\n", data.Question) @@ -95,8 +95,9 @@ inputLoop: if data.Question != "" { fmt.Printf( tui.Format(tui.FmtBold, tui.FgColorGrey) + - "[" + tui.FgColorGold + "?" + tui.FgColorGrey + "]" + tui.FmtReset + " " + data.Notice + - "(" + tui.FgColorGreen + "y" + tui.FmtReset + "/" + tui.FgColorRed + "n" + tui.FmtReset + ")" + + "[" + tui.FgColorGold + "!" + tui.FgColorGrey + "]" + tui.FmtReset + " " + + data.Question + " " + + "(" + tui.FgColorGreen + "y" + tui.FmtReset + "/" + tui.FgColorRed + "n" + tui.FmtReset + ") " + tui.FgColorGrey + ">>" + tui.Format(tui.FmtItalic, tui.FgColorGold) + "\n", ) //fmt.Printf("\033[1m\033[38;5;247m[\033[38;5;214m?\033[38;5;247m]\033[0m %s (\033[38;5;34my\033[0m/\033[38;5;167mn\033[0m) \033[38;5;247m>>\033[3m\033[38;5;214m\n", data.Question)