From 5b9a1ba079cbb887dd276f02757f13dd3ffd995e Mon Sep 17 00:00:00 2001 From: hujiebin Date: Mon, 6 Mar 2023 15:51:08 +0800 Subject: [PATCH] Update utils.go --- utils/utils.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/utils/utils.go b/utils/utils.go index e1c99d0..ed2d9f0 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 +} -- 2.22.0