add InSlice

This commit is contained in:
Alex Grintsvayg 2018-02-28 10:49:01 -05:00
parent 058f350ad0
commit 2d3c89af28
No known key found for this signature in database
GPG key ID: AEB3F089F86A22B5

10
util/slice.go Normal file
View file

@ -0,0 +1,10 @@
package util
func InSlice(str string, values []string) bool {
for _, v := range values {
if str == v {
return true
}
}
return false
}