添加日志
This commit is contained in:
@@ -63,3 +63,13 @@ var checkModuleRe = regexp.MustCompile("[^\\.a-zA-Z_\\-0-9]")
|
||||
func CheckModuleQuery(moduleQuery string) bool {
|
||||
return !checkModuleRe.MatchString(moduleQuery)
|
||||
}
|
||||
|
||||
// 检测数据的范围是否符合要求
|
||||
func CheckValueRange[T comparable](v T, rangevalues ...T) bool {
|
||||
for _, rv := range rangevalues {
|
||||
if v == rv {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user