From b898fc1bf5e9b5791b0b362b555d082f44de2068 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Thu, 24 Aug 2017 15:43:33 -0400 Subject: [PATCH] find-todos: update to markdown pattern Signed-off-by: Vincent Batts --- cmd/find-todos/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/find-todos/main.go b/cmd/find-todos/main.go index 14abeb4..6cbf433 100644 --- a/cmd/find-todos/main.go +++ b/cmd/find-todos/main.go @@ -28,7 +28,7 @@ func main() { NoteDir = filepath.Join(os.Getenv("HOME"), "Notes") } flNoteDir = flag.String("d", NoteDir, "directory of notes") - flNotePat = flag.String("p", "Tasks*.txt", "file pattern") + flNotePat = flag.String("p", "Tasks*.md", "file pattern") flag.Parse() matches, err := filepath.Glob(filepath.Join(*flNoteDir, *flNotePat)) @@ -54,7 +54,7 @@ func main() { fmt.Println(err) os.Exit(1) } - count += 1 + count++ if strings.Contains(line, "TODO") { fmt.Printf("%s:%d\t%s\n", filepath.Base(match), count, strings.TrimRight(line, " \n")) trimmed := strings.TrimSpace(line)