From e3ad92f85d36d3e6ca005b0367bc6657071d6a8a Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Sat, 25 Jan 2020 09:47:41 +0100 Subject: camelcase: fix lint reports Signed-off-by: Valentin Rothberg --- pkg/util/camelcase/camelcase.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pkg/util/camelcase') 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 } -- cgit v1.2.3-54-g00ecf