This commit is contained in:
eson
2023-09-01 10:48:00 +08:00
parent 2d62681600
commit aa4a48b68a
3 changed files with 27 additions and 1 deletions

View File

@@ -56,3 +56,10 @@ func hasInvalidPatterns(key string) bool {
return false
}
var checkModuleRe = regexp.MustCompile("[^\\.a-zA-Z_-]")
// CheckModuleQuery 检查模块的json查询的格式
func CheckModuleQuery(moduleQuery string) bool {
return !checkModuleRe.MatchString(moduleQuery)
}