// StringSliceIndex returns the index of the str, else -1. func StringSliceIndex(slice []string, str string) int { … } // StringSliceContains returns true if the slice has the string. func StringSliceContains(slice []string, str string) bool { … } // SameEndingSubSlice returns true if the slices end the same way, e.g. // {"a", "b", "c"}, {"b", "c"} => true // {"a", "b", "c"}, {"a", "b"} => false // If one slice is empty and the other is not, return false. func SameEndingSubSlice(shortest, longest []string) bool { … }