diff options
| author | Grant Ammons <gammons@gmail.com> | 2016-04-24 10:22:33 -0400 |
|---|---|---|
| committer | Grant Ammons <gammons@gmail.com> | 2016-04-24 10:22:33 -0400 |
| commit | 63893587cb41a1980318b60bf05fafbf433a24ab (patch) | |
| tree | 39c93f3a1735ef33d028ab9ef44fc0ac15049208 /todo.go | |
| parent | 6bb90375f4efb2f390a61ede0df70eea1ef1f50f (diff) | |
Organize things a bit better
Diffstat (limited to 'todo.go')
| -rw-r--r-- | todo.go | 28 |
1 files changed, 9 insertions, 19 deletions
@@ -1,22 +1,12 @@ -package todolist +package main -import "time" +import "fmt" +import "github.com/gammons/todolist/todolist" -type Todo struct { - Id int - Subject string - Projects []string - Contexts []string - Due string - FormattedDue time.Time - Completed bool - Archived bool -} - -func NewTodo() *Todo { - return &Todo{Completed: false, Archived: false} -} - -func (t Todo) Valid() bool { - return (t.Subject != "") +func main() { + store := todolist.NewFileStore() + store.Load() + for _, item := range store.Data { + fmt.Println(item) + } } |
