aboutsummaryrefslogtreecommitdiffstats
path: root/todo.go
diff options
context:
space:
mode:
authorGrant Ammons <gammons@gmail.com>2016-04-24 10:22:33 -0400
committerGrant Ammons <gammons@gmail.com>2016-04-24 10:22:33 -0400
commit63893587cb41a1980318b60bf05fafbf433a24ab (patch)
tree39c93f3a1735ef33d028ab9ef44fc0ac15049208 /todo.go
parent6bb90375f4efb2f390a61ede0df70eea1ef1f50f (diff)
Organize things a bit better
Diffstat (limited to 'todo.go')
-rw-r--r--todo.go28
1 files changed, 9 insertions, 19 deletions
diff --git a/todo.go b/todo.go
index 1319132..0f62340 100644
--- a/todo.go
+++ b/todo.go
@@ -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)
+ }
}