diff options
| author | Grant Ammons <gammons@gmail.com> | 2016-04-24 19:58:53 -0400 |
|---|---|---|
| committer | Grant Ammons <gammons@gmail.com> | 2016-04-24 19:58:53 -0400 |
| commit | dde4f5330c2126af0e3ec17e4098653c6f551426 (patch) | |
| tree | 6e3fa6b61f2e5b2d19463c7467808e44e87b290b /todolist/app.go | |
| parent | 51770b80db0fe299c69bef5060662178f67eb714 (diff) | |
Bring in the app and router
Diffstat (limited to 'todolist/app.go')
| -rw-r--r-- | todolist/app.go | 16 |
1 files changed, 16 insertions, 0 deletions
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() +} |
