From 2f81558878b89045e0a8e71787905ee014736f84 Mon Sep 17 00:00:00 2001 From: Gerrit Date: Mon, 14 Oct 2024 08:36:16 +0200 Subject: [PATCH] Rename. --- pkg/genericcli/prompt.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/genericcli/prompt.go b/pkg/genericcli/prompt.go index 54b3d15..a01132d 100644 --- a/pkg/genericcli/prompt.go +++ b/pkg/genericcli/prompt.go @@ -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) @@ -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]) } }