diff options
| author | Grant Ammons <gammons@gmail.com> | 2016-05-08 07:48:50 -0400 |
|---|---|---|
| committer | Grant Ammons <gammons@gmail.com> | 2016-05-08 07:48:50 -0400 |
| commit | a886124d40f79f311230d2f03f161fd361e43040 (patch) | |
| tree | d0105bd88e69f682b95310036c3c4a7a8dcfaa6a /todolist/app.go | |
| parent | 8bb8317f1f29a7dd1b910931ebd12c739a5fa1cc (diff) | |
Look for .todos.json in the directory we are in
This allows for project-specific todos.
Diffstat (limited to 'todolist/app.go')
| -rw-r--r-- | todolist/app.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/todolist/app.go b/todolist/app.go index 0d3ce95..7d3ccb2 100644 --- a/todolist/app.go +++ b/todolist/app.go @@ -13,10 +13,14 @@ type App struct { func NewApp() *App { app := &App{TodoStore: NewFileStore()} - app.TodoStore.Load() return app } +func (a *App) InitializeRepo() { + a.TodoStore.Initialize() + fmt.Println("Todo repo initialized.") +} + func (a *App) AddTodo(input string) { parser := &Parser{} todo := parser.ParseNewTodo(input) |
