StringInSlice determines if `slice` contains the string `a`.
(a string, slice []string)
| 172 | |
| 173 | // StringInSlice determines if `slice` contains the string `a`. |
| 174 | func StringInSlice(a string, slice []string) bool { |
| 175 | for _, b := range slice { |
| 176 | if a == b { |
| 177 | return true |
| 178 | } |
| 179 | } |
| 180 | return false |
| 181 | } |
| 182 | |
| 183 | // IntInSlice determines if `slice` contains the int `a`. |
| 184 | func IntInSlice(a int, slice []int) bool { |
no outgoing calls
searching dependent graphs…