- 修复IsErrMatch中的字符串判断错误

This commit is contained in:
gazebo
2019-07-23 16:20:23 +08:00
parent 0e498cf666
commit fbb97e9f3b

View File

@@ -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
}