diff options
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() +} |
