type stringFinder … func makeStringFinder(pattern string) *stringFinder { … } func longestCommonSuffix(a, b string) (i int) { … } // next returns the index in text of the first occurrence of the pattern. If // the pattern is not found, it returns -1. func (f *stringFinder) next(text string) int { … }