diff options
| author | Grant Ammons <grant@pipelinedealsco.com> | 2017-01-18 07:27:18 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-01-18 07:27:18 -0500 |
| commit | 3f952812c67ba7be4dc914946eceb92ae77462a7 (patch) | |
| tree | c8dadc6f9941b9462407c49ff91eededa4764d8c /todolist/app.go | |
| parent | 976e6f28c016752745a0dc3365ccc09ac03daf78 (diff) | |
| parent | e85b6a5c808ad579e9cc81c57fccccd2498819dc (diff) | |
Merge pull request #18 from NonerKao/master
Bugfix: "todo a" no longer adds an empty todo
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..45b9812 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("I need more information. Try something like 'todo a chat with @bob due tom'") + return + } a.TodoList.Add(todo) a.Save() |
