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