From dde4f5330c2126af0e3ec17e4098653c6f551426 Mon Sep 17 00:00:00 2001 From: Grant Ammons Date: Sun, 24 Apr 2016 19:58:53 -0400 Subject: Bring in the app and router --- todolist/app.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 todolist/app.go (limited to 'todolist/app.go') diff --git a/todolist/app.go b/todolist/app.go new file mode 100644 index 0000000..3235f99 --- /dev/null +++ b/todolist/app.go @@ -0,0 +1,16 @@ +package todolist + +type App struct { + TodoStore Store +} + +func NewApp() *App { + app := &App{TodoStore: NewFileStore()} + app.TodoStore.Load() + return app +} + +func (a *App) ListTodos(input string) { + formatter := NewFormatter(a.TodoStore.Todos()) + formatter.Print() +} -- cgit v1.3