diff --git a/utils/utils.go b/utils/utils.go index e1c99d05f7be29ce8b2a4e97c4fe9df5881a9128..ed2d9f02ac9d36df4c5ab0a61c74105d41201887 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -82,4 +82,13 @@ func StrToString(str *mysql.Str) *string { func NumToUint32(num *mysql.Num) *uint32 { return (*uint32)(num) -} \ No newline at end of file +} + +func IsInStringList(str string, list []string) bool { + for _, v := range list { + if str == v { + return true + } + } + return false +}