Exemple #1
0
func NewLineReader(src io.ReaderAt) LineReader {
	l := LineReader{
		src:         src,
		offsetCache: sortedmap.NewMap(),
	}

	// Line 1 starts at the beginning of the file!
	l.offsetCache.Insert(1, 0)

	return l
}
Exemple #2
0
func NewSearchResults() searchResults {
	return searchResults{
		lines: sortedmap.NewMap(),
	}
}