diff options
| author | Quey-Liang Kao <s101062801@m101.nthu.edu.tw> | 2017-08-14 16:37:40 +0800 |
|---|---|---|
| committer | Quey-Liang Kao <s101062801@m101.nthu.edu.tw> | 2017-08-14 16:37:40 +0800 |
| commit | e1ed1a2357bbf5083e96c883071339235ac0f02e (patch) | |
| tree | 400e6e82a90619e6c87865beec9d6880cb5f286d /todolist/app.go | |
| parent | 9f62f82025e4dd7fa3a0dfc50bb94704209e608c (diff) | |
| parent | 7c24f39a0fc8bb07dc9db4f5fecd3468705b1e37 (diff) | |
Merge branch 'note' of github.com:NonerKao/todolist into note_patch_set
Diffstat (limited to 'todolist/app.go')
| -rw-r--r-- | todolist/app.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/todolist/app.go b/todolist/app.go index 367cc2f..2919234 100644 --- a/todolist/app.go +++ b/todolist/app.go @@ -132,6 +132,23 @@ func (a *App) ExpandTodo(input string) { fmt.Println("Todo expanded.") } +func (a *App) ManipulateNotes(input string) { + a.Load() + id, todo := a.getId(input) + parser := &Parser{} + if id == -1 { + return + } + + retStr := parser.ParseNotes(todo, input) + if retStr != "" { + a.Save() + if retStr != "list" { + fmt.Println("Notes " + retStr + "ed.") + } + } +} + func (a *App) ArchiveCompleted() { a.Load() for _, todo := range a.TodoList.Todos() { |
