Add stringInSlice function
This commit is contained in:
parent
dcb8906748
commit
95fc73543c
1 changed files with 9 additions and 0 deletions
9
util.go
9
util.go
|
|
@ -177,3 +177,12 @@ func parseProfile(user legacyUser) Profile {
|
||||||
|
|
||||||
return profile
|
return profile
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func stringInSlice(a string, list []string) bool {
|
||||||
|
for _, b := range list {
|
||||||
|
if b == a {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue