fix confirmation
This commit is contained in:
parent
cd140e6e1f
commit
f2ff008b6a
2 changed files with 6 additions and 16 deletions
13
ansi.go
13
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()
|
||||
|
|
|
@ -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,7 +95,8 @@ inputLoop:
|
|||
if data.Question != "" {
|
||||
fmt.Printf(
|
||||
tui.Format(tui.FmtBold, tui.FgColorGrey) +
|
||||
"[" + tui.FgColorGold + "?" + tui.FgColorGrey + "]" + tui.FmtReset + " " + data.Notice +
|
||||
"[" + 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",
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue