aboutsummaryrefslogtreecommitdiffstats
path: root/todolist/app.go
diff options
context:
space:
mode:
Diffstat (limited to 'todolist/app.go')
-rw-r--r--todolist/app.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/todolist/app.go b/todolist/app.go
index 1ab6b20..e3d8cc7 100644
--- a/todolist/app.go
+++ b/todolist/app.go
@@ -15,6 +15,11 @@ type App struct {
func NewApp() *App {
app := &App{TodoList: &TodoList{}, TodoStore: NewFileStore()}
+ if app.TodoStore.FileLocation == "" {
+ fmt.Println("No todo file found!")
+ fmt.Println("You may run 'todo init' to initialize an empty repo in current directory.")
+ return nil
+ }
return app
}