mirror of
https://github.com/1f349/lavender.git
synced 2024-12-22 23:54:10 +00:00
17 lines
261 B
Go
17 lines
261 B
Go
package server
|
|
|
|
func HasRole(roles []string, test string) bool {
|
|
for _, role := range roles {
|
|
if role == test {
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
}
|
|
|
|
func ForEachRole(roles []string, next func(role string)) {
|
|
for _, role := range roles {
|
|
next(role)
|
|
}
|
|
}
|