You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
313 B
20 lines
313 B
4 years ago
|
package utils
|
||
|
|
||
|
func SliceIncludes(slice []string, item string) bool {
|
||
|
for _, val := range slice {
|
||
|
if val == item {
|
||
|
return true
|
||
|
}
|
||
|
}
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
//func indexOf(answers []interface{}, item interface{}) (int) {
|
||
|
// for k, v := range answers {
|
||
|
// if v == item {
|
||
|
// return k
|
||
|
// }
|
||
|
// }
|
||
|
// return -1
|
||
|
//}
|