aboutsummaryrefslogtreecommitdiffstats
path: root/todolist/app.go
diff options
context:
space:
mode:
Diffstat (limited to 'todolist/app.go')
-rw-r--r--todolist/app.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/todolist/app.go b/todolist/app.go
index 9fefd8e..eb2f5c2 100644
--- a/todolist/app.go
+++ b/todolist/app.go
@@ -93,13 +93,13 @@ func (a *App) UnarchiveTodo(input string) {
func (a *App) EditTodo(input string) {
a.Load()
- id, _ := a.getId(input)
+ id, todo := a.getId(input)
if id == -1 {
return
}
parser := &Parser{}
- if (parser.ParseEditTodo(a.TodoList.FindById(id), input)) {
+ if (parser.ParseEditTodo(todo, input)) {
a.Save()
fmt.Println("Todo updated.")
}