refactor: improve NewEnforcer()

This commit is contained in:
weloe
2023-05-06 23:24:53 +08:00
parent bbcdb0fedb
commit 25f85c7114
3 changed files with 92 additions and 41 deletions

10
util/util.go Normal file
View File

@@ -0,0 +1,10 @@
package util
func HasNil(arr []interface{}) bool {
for _, elem := range arr {
if elem == nil {
return true
}
}
return false
}