From 0d815737ccb61a6664a9943516518decdddf0bb2 Mon Sep 17 00:00:00 2001 From: Grant Ammons Date: Mon, 12 Jun 2017 08:16:41 -0400 Subject: Put the return after the os.Exit --- todolist/file_store.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'todolist') diff --git a/todolist/file_store.go b/todolist/file_store.go index 7b512ec..2eee5c1 100644 --- a/todolist/file_store.go +++ b/todolist/file_store.go @@ -44,6 +44,7 @@ func (f *FileStore) Load() ([]*Todo, error) { fmt.Println("No todo file found!") fmt.Println("Initialize a new todo repo by running 'todo init'") os.Exit(0) + return nil, err } var todos []*Todo @@ -51,6 +52,7 @@ func (f *FileStore) Load() ([]*Todo, error) { if jerr != nil { fmt.Println("Error reading json data", jerr) os.Exit(1) + return nil, jerr } f.Loaded = true -- cgit v1.3