diff --git a/util/string.go b/util/string.go index da3a050..3d1074a 100644 --- a/util/string.go +++ b/util/string.go @@ -54,6 +54,9 @@ func Md5(str string) string { // // Date : 4:58 下午 2021/10/25 func SnakeCaseToCamel(str string) string { + if len(str) == 0 { + return "" + } builder := strings.Builder{} index := 0 if str[0] >= 'a' && str[0] <= 'z' {