From a886124d40f79f311230d2f03f161fd361e43040 Mon Sep 17 00:00:00 2001 From: Grant Ammons Date: Sun, 8 May 2016 07:48:50 -0400 Subject: Look for .todos.json in the directory we are in This allows for project-specific todos. --- todolist/app.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'todolist/app.go') 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) -- cgit v1.3