1
0
Fork 0
mirror of https://github.com/vbatts/freezing-octo-hipster.git synced 2024-11-21 22:45:39 +00:00

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

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)