diff options
| author | Quey-Liang Kao <s101062801@m101.nthu.edu.tw> | 2017-01-17 03:18:14 +0800 |
|---|---|---|
| committer | Quey-Liang Kao <s101062801@m101.nthu.edu.tw> | 2017-01-17 03:18:14 +0800 |
| commit | c54a184a24f76eda473f585314716bd567dc14bf (patch) | |
| tree | 0fa8333469faf10e50a740516081690d0fff953a /todolist/app.go | |
| parent | 3813ef4378d25ade98a693bf3eef959754e8af20 (diff) | |
| parent | 05b64e4315ba17960f5bb2119e79eec2476459b2 (diff) | |
Merge github.com:NonerKao/todolist
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() |
