aboutsummaryrefslogtreecommitdiffstats
path: root/todolist/app.go
diff options
context:
space:
mode:
authorQuey-Liang Kao <s101062801@m101.nthu.edu.tw>2017-08-20 21:56:37 +0800
committerQuey-Liang Kao <s101062801@m101.nthu.edu.tw>2017-08-20 21:56:37 +0800
commit387d92060c04998fa8a723f2eba814469bc39d57 (patch)
treeddb228b1c8154a4ccee0b6438da5c0bcd7eda7b5 /todolist/app.go
parent620a9f3aff090063f79285fb20437a62ce089a4e (diff)
parent7c24f39a0fc8bb07dc9db4f5fecd3468705b1e37 (diff)
Merge branch 'note' of github.com:NonerKao/todolist
Diffstat (limited to 'todolist/app.go')
-rw-r--r--todolist/app.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/todolist/app.go b/todolist/app.go
index f63c41b..96da67f 100644
--- a/todolist/app.go
+++ b/todolist/app.go
@@ -137,6 +137,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() {