From 89b73b0df1a5c06cf2399bfb0d46a83e053c6561 Mon Sep 17 00:00:00 2001 From: Quey-Liang Kao Date: Sun, 19 Feb 2017 22:12:39 +0800 Subject: Refine previous commit --- todolist/file_store.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'todolist/file_store.go') diff --git a/todolist/file_store.go b/todolist/file_store.go index 63738b2..4a7f0e0 100644 --- a/todolist/file_store.go +++ b/todolist/file_store.go @@ -25,7 +25,10 @@ func NewFileStore() *FileStore { } else if err2 == nil { return &FileStore{FileLocation: homerepo, Loaded: false} } else { - return &FileStore{FileLocation: "", Loaded: false} + fmt.Println("No todo file found!") + fmt.Println("You may run 'todo init' to initialize an empty repo in working directory.") + os.Exit(1) + return nil } } -- cgit v1.3