mirror of
https://github.com/weloe/token-go.git
synced 2025-10-04 15:12:47 +08:00
refactor: improve NewEnforcer()
This commit is contained in:
10
util/util.go
Normal file
10
util/util.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package util
|
||||
|
||||
func HasNil(arr []interface{}) bool {
|
||||
for _, elem := range arr {
|
||||
if elem == nil {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
Reference in New Issue
Block a user