Skip to content

Commit

Permalink
Rename.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit91 committed Oct 14, 2024
1 parent ca09cb9 commit 2f81558
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/genericcli/prompt.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func PromptCustom(c *PromptConfig) error {
}

if c.ShowAnswers {
firstCharToUpper := func(s string) string {
sentenceCase := func(s string) string {
runes := []rune(s)
runes[0] = unicode.ToUpper(runes[0])
return string(runes)
Expand All @@ -98,9 +98,9 @@ func PromptCustom(c *PromptConfig) error {

if c.DefaultAnswer != "" {
if c.DefaultAnswer == c.No {
no = firstCharToUpper(c.No)
no = sentenceCase(c.No)
} else {
yes = firstCharToUpper(c.AcceptedAnswers[defaultAnswerIndex])
yes = sentenceCase(c.AcceptedAnswers[defaultAnswerIndex])
}
}

Expand Down

0 comments on commit 2f81558

Please sign in to comment.