diff --git a/src/pkg/index/suffixarray/suffixarray.go b/src/pkg/index/suffixarray/suffixarray.go index 2d728e2c3ae..0a8d9e2cb8b 100644 --- a/src/pkg/index/suffixarray/suffixarray.go +++ b/src/pkg/index/suffixarray/suffixarray.go @@ -49,6 +49,14 @@ func New(data []byte) *Index { } +// Data returns the data over which the index was created. +// It must not be modified. +// +func (x *Index) Data() []byte { + return x.data +} + + func (x *Index) at(i int) []byte { return x.data[x.sa[i]:] }