diff --git a/utils/string.go b/utils/string.go index aba3e94..585b55a 100644 --- a/utils/string.go +++ b/utils/string.go @@ -212,7 +212,9 @@ func KsortToStr(params map[string]string) []string { return keys } func UderscoreToUpperCamelCase(s string) string { - s = strings.Replace(s, "_", " ", -1) - s = strings.Title(s) - return strings.Replace(s, " ", "", -1) + split := strings.Split(s, "_") + if len(split) == 2 { + s = split[0] + strings.Title(split[1]) + } + return s }