maybe TODO is the end of the line

This commit is contained in:
Vincent Batts 2014-08-11 08:28:07 -04:00
parent b919fcc4f2
commit 3c5325283f
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ func main() {
if strings.Contains(line, "TODO") {
fmt.Printf("%s:%d\t%s\n", filepath.Base(match), count, strings.TrimRight(line, " \n"))
trimmed := strings.TrimSpace(line)
if strings.HasSuffix(trimmed, ":") {
if strings.HasSuffix(trimmed, ":") || strings.HasSuffix(trimmed, "TODO") {
i := strings.IndexRune(line, rune(trimmed[0]))
for {
buf, err := rdr.Peek(i + 1)