11 lines
161 B
Go
11 lines
161 B
Go
|
package variables
|
||
|
|
||
|
func StringInSlice(a string, list []string) (bool, int) {
|
||
|
for i, b := range list {
|
||
|
if b == a {
|
||
|
return true, i
|
||
|
}
|
||
|
}
|
||
|
return false, 0
|
||
|
}
|