Author: Pedro Lucas Porcellis <pedrolucasporcellis@gmail.com>
Display the index to edit that note
commands/list.go | 4 ++--
diff --git a/commands/list.go b/commands/list.go index ae58f5cd872ed9a652753dad61e4f563c5741966..5703de53753c56b8eae3d28f77961dda632f53ba 100644 --- a/commands/list.go +++ b/commands/list.go @@ -30,8 +30,8 @@ } fmt.Println(Bold("\n \t Your notes\n\n")) - for _, note := range notes { - fmt.Printf("%s (%s)\n", Bold(note.Title()), Faint(note.UpdatedAt()).BrightYellow()) + for index, note := range notes { + fmt.Printf("[#%d] %s (%s)\n", index, Bold(note.Title()), Faint(note.UpdatedAt()).BrightYellow()) f, err := os.Open(note.Path) check(err)