diff options
| author | Quey-Liang Kao <s101062801@m101.nthu.edu.tw> | 2017-08-20 22:11:33 +0800 |
|---|---|---|
| committer | Quey-Liang Kao <s101062801@m101.nthu.edu.tw> | 2017-08-20 22:11:33 +0800 |
| commit | ebc7b53438ef6328baf813c7cad19e43839ad0f1 (patch) | |
| tree | 667394a3206f58c65c6a2d0be7503a5d65ea2bcb /todolist | |
| parent | 7877f0735dab782f66af157b39d6de3539c97102 (diff) | |
| parent | 7bd6749e7fdfbc636b15cb18d89081eb78f870a8 (diff) | |
Merge branch 'master' into note
Diffstat (limited to 'todolist')
| -rw-r--r-- | todolist/app.go | 6 |
1 files 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 } |
