We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b2a90d5 commit 131449aCopy full SHA for 131449a
internal/utils/utils.go
@@ -8,6 +8,8 @@ import (
8
9
"github.com/platogo/zube"
10
"github.com/spf13/pflag"
11
+ "golang.org/x/text/cases"
12
+ "golang.org/x/text/language"
13
)
14
15
// Returns a string truncated to the given `maxLen`
@@ -31,7 +33,7 @@ func TruncateString(s string, maxLen int) string {
31
33
// Converts a snake case string (e.g. `in_progress`) to title case (e.g. `In Progress`)
32
34
func SnakeCaseToTitleCase(s string) string {
35
spacedWords := strings.ReplaceAll(s, "_", " ")
- return strings.Title(spacedWords)
36
+ return cases.Title(language.English).String(spacedWords)
37
}
38
39
// Constructs a zube `Query` from Cobra flags
0 commit comments