diff options
Diffstat (limited to 'todolist/app.go')
| -rw-r--r-- | todolist/app.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/todolist/app.go b/todolist/app.go index 44d97f5..7644d46 100644 --- a/todolist/app.go +++ b/todolist/app.go @@ -25,6 +25,10 @@ func (a *App) AddTodo(input string) { a.Load() parser := &Parser{} todo := parser.ParseNewTodo(input) + if todo == nil { + fmt.Println("What to do?") + return + } a.TodoList.Add(todo) a.Save() |
