diff options
Diffstat (limited to 'pkg/util/camelcase')
-rw-r--r-- | pkg/util/camelcase/camelcase.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/util/camelcase/camelcase.go b/pkg/util/camelcase/camelcase.go index 02160c9a4..0a82d1005 100644 --- a/pkg/util/camelcase/camelcase.go +++ b/pkg/util/camelcase/camelcase.go @@ -55,7 +55,7 @@ func Split(src string) (entries []string) { class := 0 // split into fields based on class of unicode character for _, r := range src { - switch true { + switch { case unicode.IsLower(r): class = 1 case unicode.IsUpper(r): @@ -86,5 +86,6 @@ func Split(src string) (entries []string) { entries = append(entries, string(s)) } } - return + + return entries } |