In the text, using a suffix array, I selected the indices, at the moment my traversal algorithm looks like this, I am sure that there are more elegant versions using classical algorithms.
index := suffixarray.New(buff.Bytes())
offset := index.Lookup(searchIndex, -1)
sort.Ints(offset)
l := len(offset)
sliceOfBytes := make([][]byte, l)
for iter := 0; l > 0; iter++ {
if l == 1 {
sliceOfBytes[iter] = buff.Next(offset[len(offset)-1])
break
}
sliceOfBytes[iter] = buff.Next(offset[iter+1] - offset[iter])
l--
}