Add users filtering

This commit is contained in:
Julien Riou 2018-06-30 10:44:58 +02:00
commit ef67682463
No known key found for this signature in database
GPG key ID: BA3E15176E45E85D
6 changed files with 150 additions and 19 deletions

View file

@ -10,3 +10,13 @@ func Panic(err error) {
log.Fatalf("%s\n", err)
}
}
// InSlice detects value presence in a string slice
func InSlice(value string, slice []string) bool {
for _, val := range slice {
if value == val {
return true
}
}
return false
}