sing-box/common/baderror/baderror.go

13 lines
198 B
Go
Raw Normal View History

2022-08-29 02:10:41 +00:00
package baderror
import "strings"
func Contains(err error, msgList ...string) bool {
for _, msg := range msgList {
if strings.Contains(err.Error(), msg) {
return true
}
}
return false
}