How does one determine the position of an element present in slice?
I need something like the following:
type intSlice []int func (slice intSlice) p
func index(slice []string, item string) int { for i, _ := range slice { if slice[i] == item { return i } } return -1 }