From 7bd6749e7fdfbc636b15cb18d89081eb78f870a8 Mon Sep 17 00:00:00 2001 From: Quey-Liang Kao Date: Sun, 20 Aug 2017 22:06:05 +0800 Subject: Fix out-of-date usage according to internal API changes Since the getId() function has been changed, the call in ManipulateNotes() is fixed in this patch. --- todolist/app.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/todolist/app.go b/todolist/app.go index 96da67f..66b30c8 100644 --- a/todolist/app.go +++ b/todolist/app.go @@ -139,9 +139,11 @@ func (a *App) ExpandTodo(input string) { func (a *App) ManipulateNotes(input string) { a.Load() - id, todo := a.getId(input) + id := a.getId(input) parser := &Parser{} - if id == -1 { + todo := a.TodoList.FindById(id) + if todo == nil { + fmt.Println("No such id.") return } -- cgit v1.3