From a4f6d5af95db62e6f179eeda8bd2a2e1825fcd5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Tue, 9 Nov 2021 20:09:31 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=AC=E9=A9=BC=E5=B3=B0=E5=85=BC=E5=AE=B9?= =?UTF-8?q?=E5=AD=97=E7=AC=A6=E4=B8=B2=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- util/string.go | 3 +++ 1 file changed, 3 insertions(+) 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' {