diff options
| author | Grant Ammons <gammons@gmail.com> | 2016-05-01 19:17:54 -0400 |
|---|---|---|
| committer | Grant Ammons <gammons@gmail.com> | 2016-05-01 19:17:54 -0400 |
| commit | b1fc3359eb7498236621d1aa6a9ff18f8cce73c0 (patch) | |
| tree | 7422852d05743e195171c8006deca46a19e19e82 /todolist/app.go | |
| parent | 0905a863f50d9631e6c44488b952622e75d79785 (diff) | |
Sort todos by due date by default
Diffstat (limited to 'todolist/app.go')
| -rw-r--r-- | todolist/app.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/todolist/app.go b/todolist/app.go index 74fb8dc..267f482 100644 --- a/todolist/app.go +++ b/todolist/app.go @@ -36,6 +36,14 @@ func (a *App) DeleteTodo(input string) { } } +func (a *App) ListTodos(input string) { + //filtered := NewFilter(a.TodoStore.Todos()).filter() + grouped := a.getGroups(input) + + formatter := NewFormatter(grouped) + formatter.Print() +} + func (a *App) getId(input string) int { re, _ := regexp.Compile("\\d+") @@ -47,14 +55,6 @@ func (a *App) getId(input string) int { } } -func (a *App) ListTodos(input string) { - //filtered := NewFilter(a.TodoStore.Todos()).filter() - grouped := a.getGroups(input) - - formatter := NewFormatter(grouped) - formatter.Print() -} - func (a *App) getGroups(input string) *GroupedTodos { grouper := &Grouper{} contextRegex, _ := regexp.Compile(`by c.*$`) |
