diff options
| author | Grant Ammons <gammons@gmail.com> | 2017-03-27 09:05:49 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-03-27 09:05:49 -0400 |
| commit | b036ca15caf784115386a82bf6d797e3a4554693 (patch) | |
| tree | a0fbcd586e40d54255820b0ddbee6db359987e7d | |
| parent | 40be25720ac4686ca07db0b3b7f18ceb39776eb6 (diff) | |
| parent | 4feca9dcb85823e9fc000a46a8bdb465a0d0c43d (diff) | |
Merge pull request #49 from gammons/show-id-on-create
Show the id after creating a todo
| -rw-r--r-- | todolist/app.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/todolist/app.go b/todolist/app.go index a9145a1..880390e 100644 --- a/todolist/app.go +++ b/todolist/app.go @@ -31,9 +31,10 @@ func (a *App) AddTodo(input string) { return } + id := a.TodoList.NextId() a.TodoList.Add(todo) a.Save() - fmt.Println("Todo added.") + fmt.Printf("Todo %d added.\n", id) } func (a *App) DeleteTodo(input string) { |
