From 5d28dac9b2e1d153f33551b968ab4c92cfce23ce Mon Sep 17 00:00:00 2001 From: Quey-Liang Kao Date: Mon, 14 Aug 2017 14:41:40 +0800 Subject: Implement the "an" feature: Adding notes to todos This patch introduce a new attribute of a todo item, which is "Notes", of type []string. The following enhancing patches will contain the listing, removing and editing features. --- todo.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'todo.go') diff --git a/todo.go b/todo.go index 1eea73c..77faccb 100644 --- a/todo.go +++ b/todo.go @@ -122,6 +122,11 @@ func usage() { yellow.Println("\ttodo d 33") fmt.Println("\tDeletes a todo with id 33\n") + blueBold.Println("\nManipulating notes") + fmt.Println(" You can add additional information to a existing todo.\n") + yellow.Println("\ttodo an 12 check http://this.web.site") + fmt.Println("\tAdds notes \"check http://this.web.site\" to the todo with id 12\n") + blueBold.Println("\nGarbage Collection") yellow.Println("\ttodo gc") fmt.Println("\tDeletes all archived todos.\n") @@ -153,6 +158,8 @@ func routeInput(command string, input string) { app.EditTodo(input) case "ex", "expand": app.ExpandTodo(input) + case "an": + app.ManipulateNotes(input) case "gc": app.GarbageCollect() case "p", "prioritize": -- cgit v1.3