Package lines provides iterator-based tools to read, search, and modify lines in text files and streams.
go get mz.attahri.com/code/lines// Count TODO comments in a file
count, err := lines.CountFunc(lines.All(r), func(line string) bool {
return strings.Contains(line, "TODO")
})See godoc for complete documentation and examples.
Contributions are welcome via Pull Requests.