diff options
| author | Grant Ammons <gammons@gmail.com> | 2017-04-12 08:54:19 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-04-12 08:54:19 -0400 |
| commit | e118736cf7df17dc10822fab36af7407c7e110a6 (patch) | |
| tree | 651dfc58c6c144bd1349dfe6a74c9aed477cf13f /todolist/todo_list.go | |
| parent | 146f19e1dc8143096bca6bfd0adf2e1f8d9be7b7 (diff) | |
| parent | 8badae37312c70bc9ae68c7c6c0792033fb0dbd1 (diff) | |
Merge pull request #53 from ingorichter/ingo/completion-date
Add `CompletedDate` to todo item
Diffstat (limited to 'todolist/todo_list.go')
| -rw-r--r-- | todolist/todo_list.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/todolist/todo_list.go b/todolist/todo_list.go index 19fe0b7..6bab407 100644 --- a/todolist/todo_list.go +++ b/todolist/todo_list.go @@ -28,14 +28,14 @@ func (t *TodoList) Delete(id int) { func (t *TodoList) Complete(id int) { todo := t.FindById(id) - todo.Completed = true + todo.Complete() t.Delete(id) t.Data = append(t.Data, todo) } func (t *TodoList) Uncomplete(id int) { todo := t.FindById(id) - todo.Completed = false + todo.Uncomplete() t.Delete(id) t.Data = append(t.Data, todo) } |
