Add grpc compatibility test
This commit is contained in:
12
common/baderror/baderror.go
Normal file
12
common/baderror/baderror.go
Normal file
@@ -0,0 +1,12 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user