- 修复IsErrMatch中的字符串判断错误
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user