aboutsummaryrefslogtreecommitdiffstats
path: root/todolist/app.go
blob: 3235f99daffada36adcb261793240b0b43479034 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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()
}