aboutsummaryrefslogtreecommitdiffstats
path: root/todolist/todo_item.go
diff options
context:
space:
mode:
authorGrant Ammons <gammons@gmail.com>2017-03-03 18:30:06 -0500
committerGrant Ammons <gammons@gmail.com>2017-03-03 18:30:06 -0500
commitc2114f083afeb1ac2cc28e9a83f3a9c591b59a1f (patch)
tree0ef4b9c60917e1428202cbb9b0fcc6abd20adb3c /todolist/todo_item.go
parentbe32789ec53ebe0a2141cf4d13696280ef79ee7f (diff)
Add priority feature
Now, todos have a priority flag. When listed, these todos will be bolded and italic. You can list todos by priority by running `todolist l p`.
Diffstat (limited to 'todolist/todo_item.go')
-rw-r--r--todolist/todo_item.go17
1 files changed, 9 insertions, 8 deletions
diff --git a/todolist/todo_item.go b/todolist/todo_item.go
index 6b820b1..273df8d 100644
--- a/todolist/todo_item.go
+++ b/todolist/todo_item.go
@@ -3,17 +3,18 @@ package todolist
import "time"
type Todo struct {
- Id int `json:"id"`
- Subject string `json:"subject"`
- Projects []string `json:"projects"`
- Contexts []string `json:"contexts"`
- Due string `json:"due"`
- Completed bool `json:"completed"`
- Archived bool `json:"archived"`
+ Id int `json:"id"`
+ Subject string `json:"subject"`
+ Projects []string `json:"projects"`
+ Contexts []string `json:"contexts"`
+ Due string `json:"due"`
+ Completed bool `json:"completed"`
+ Archived bool `json:"archived"`
+ IsPriority bool `json:"isPriority"`
}
func NewTodo() *Todo {
- return &Todo{Completed: false, Archived: false}
+ return &Todo{Completed: false, Archived: false, IsPriority: false}
}
func (t Todo) Valid() bool {