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 }
func NewSearchResults() searchResults { return searchResults{ lines: sortedmap.NewMap(), } }