From 4d45eec682401f42389c2285f732fa451200febb Mon Sep 17 00:00:00 2001 From: Michiel Alexander Boekhoff Date: Wed, 5 Apr 2017 14:30:01 +0100 Subject: [PATCH] Added lookup of notes in current book. --- main.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/main.go b/main.go index 15e916cc..7c47d80b 100644 --- a/main.go +++ b/main.go @@ -287,6 +287,18 @@ func main() { fmt.Printf("Notes:\n") + for _, note := range notes { + fmt.Printf("%s\n", note) + } + case "list", "l": + bookName, err := getCurrentBook() + check(err) + + notes, err := getNotesInBook(bookName) + check(err) + + fmt.Printf("Notes:\n") + for _, note := range notes { fmt.Printf("%s\n", note) }