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
|
var str strings.Builder
|
||||||
|
|
||||||
for _, code := range codes {
|
for _, code := range codes {
|
||||||
str.WriteString(string(code))
|
str.WriteString(code)
|
||||||
}
|
|
||||||
|
|
||||||
return str.String()
|
|
||||||
}
|
|
||||||
|
|
||||||
func Color(colors ...Colors) string {
|
|
||||||
|
|
||||||
var str strings.Builder
|
|
||||||
|
|
||||||
for _, color := range colors {
|
|
||||||
str.WriteString(color)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return str.String()
|
return str.String()
|
||||||
|
|
|
@ -28,8 +28,8 @@ func New(data InputData) (*bool, error) {
|
||||||
fmt.Printf(
|
fmt.Printf(
|
||||||
tui.Format(tui.FmtBold, tui.FgColorGrey) +
|
tui.Format(tui.FmtBold, tui.FgColorGrey) +
|
||||||
"[" + tui.FgColorGold + "!" + tui.FgColorGrey + "]" + tui.FmtReset + " " +
|
"[" + tui.FgColorGold + "!" + tui.FgColorGrey + "]" + tui.FmtReset + " " +
|
||||||
data.Question +
|
data.Question + " " +
|
||||||
"(" + tui.FgColorGreen + "y" + tui.FmtReset + "/" + tui.FgColorRed + "n" + tui.FmtReset + "\n " +
|
"(" + tui.FgColorGreen + "y" + tui.FmtReset + "/" + tui.FgColorRed + "n" + tui.FmtReset + ") " +
|
||||||
tui.FgColorGrey + ">>" + tui.Format(tui.FmtItalic, tui.FgColorGold) + "\n",
|
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)
|
//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 != "" {
|
if data.Question != "" {
|
||||||
fmt.Printf(
|
fmt.Printf(
|
||||||
tui.Format(tui.FmtBold, tui.FgColorGrey) +
|
tui.Format(tui.FmtBold, tui.FgColorGrey) +
|
||||||
"[" + tui.FgColorGold + "?" + tui.FgColorGrey + "]" + tui.FmtReset + " " + data.Notice +
|
"[" + tui.FgColorGold + "!" + tui.FgColorGrey + "]" + tui.FmtReset + " " +
|
||||||
"(" + tui.FgColorGreen + "y" + tui.FmtReset + "/" + tui.FgColorRed + "n" + tui.FmtReset + ")" +
|
data.Question + " " +
|
||||||
|
"(" + tui.FgColorGreen + "y" + tui.FmtReset + "/" + tui.FgColorRed + "n" + tui.FmtReset + ") " +
|
||||||
tui.FgColorGrey + ">>" + tui.Format(tui.FmtItalic, tui.FgColorGold) + "\n",
|
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)
|
//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)
|
||||||
|
|
Loading…
Reference in a new issue