From b1fc3359eb7498236621d1aa6a9ff18f8cce73c0 Mon Sep 17 00:00:00 2001 From: Grant Ammons Date: Sun, 1 May 2016 19:17:54 -0400 Subject: Sort todos by due date by default --- todolist/app.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'todolist/app.go') 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.*$`) -- cgit v1.3