Files
paralus/pkg/service/utils.go
Abin Simon 3aedac3201 Fix scope for roles
This might not really be necessary but a good check
2022-03-14 12:34:18 +05:30

23 lines
374 B
Go

package service
func unique(items []string) []string {
keys := make(map[string]bool)
list := []string{}
for _, entry := range items {
if _, value := keys[entry]; !value {
keys[entry] = true
list = append(list, entry)
}
}
return list
}
func contains(s []string, str string) bool {
for _, v := range s {
if v == str {
return true
}
}
return false
}