mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-26 18:41:31 +00:00
13 lines
198 B
Go
13 lines
198 B
Go
|
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
|
||
|
}
|