From fbb97e9f3b3be6c040721cd13f3dc0b7187347da Mon Sep 17 00:00:00 2001 From: gazebo Date: Tue, 23 Jul 2019 16:20:23 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E4=BF=AE=E5=A4=8DIsErrMatch=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E5=AD=97=E7=AC=A6=E4=B8=B2=E5=88=A4=E6=96=AD=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/errorwithcode.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/errorwithcode.go b/utils/errorwithcode.go index 5419ec9b..055869c5 100644 --- a/utils/errorwithcode.go +++ b/utils/errorwithcode.go @@ -69,7 +69,7 @@ func IsErrMatch(err error, strCode string, strList []string) (isMatch bool) { if strCode == "" || codeErr.Code() == strCode { isMatch = len(strList) == 0 for _, v := range strList { - if strings.Index(codeErr.ErrMsg(), v) > 0 { + if strings.Index(codeErr.ErrMsg(), v) >= 0 { isMatch = true break }