Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Scan

func Scan(haystack LengthIter, needle Extent, callback Callback) bool

Types

type Callback

type Callback = func(int, Extent) bool

type Extent

type Extent struct {
	Start, Length Int
}

func (Extent) End

func (e Extent) End() Int

type Index

type Index struct {
	// contains filtered or unexported fields
}

func NewIndex

func NewIndex(segments LengthIter) (ret Index)

func (Index) Locate

func (me Index) Locate(e Extent, output Callback) bool

type Int

type Int = int64

type Length

type Length = Int

type LengthIter

type LengthIter = func() (Length, bool)

type Locater

type Locater func(Extent, Callback) bool

func LocaterFromLengthIter

func LocaterFromLengthIter(li LengthIter) Locater