Skip to content

Commit

Permalink
perf: modify terminal menu display
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeEirc committed Jul 2, 2024
1 parent 9172a5c commit 67f66b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/handler/banner.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ func (h *InteractiveHandler) displayBanner(sess io.ReadWriter, user string, term
}
cm := ColorMeta{GreenBoldColor: "\033[1;32m", ColorEnd: "\033[0m"}
for i, v := range menu {
line := fmt.Sprintf(lang.T("\t%d) Enter {{.GreenBoldColor}}%s{{.ColorEnd}} to %s.%s"),
line := fmt.Sprintf(lang.T("\t%2d) Enter {{.GreenBoldColor}}%s{{.ColorEnd}} to %s.%s"),
i+1, v.instruct, v.helpText, "\r\n")
tmpl := template.Must(template.New("item").Parse(line))
if err := tmpl.Execute(sess, cm); err != nil {
logger.Error(err)
if err1 := tmpl.Execute(sess, cm); err1 != nil {
logger.Error(err1)
}
}
}
Expand Down

0 comments on commit 67f66b7

Please sign in to comment.