Versions in this module Expand all Collapse all v0 v0.0.4 Nov 21, 2020 Changes in this version type TaskSegmentType + func (i TaskSegmentType) String() string + type TaskSortByType uint8 + func (i TaskSortByType) String() string v0.0.3 Nov 17, 2020 Changes in this version + const SortCompletedDateAsc + const SortCompletedDateDesc + const SortContextAsc + const SortContextDesc + const SortCreatedDateAsc + const SortCreatedDateDesc + const SortDueDateAsc + const SortDueDateDesc + const SortPriorityAsc + const SortPriorityDesc + const SortProjectAsc + const SortProjectDesc + const SortTaskIDAsc + const SortTaskIDDesc + const SortTodoTextAsc + const SortTodoTextDesc + var DateLayout = "2006-01-02" + var IgnoreComments = true + func FilterCompleted(t Task) bool + func FilterDueToday(t Task) bool + func FilterHasDueDate(t Task) bool + func FilterHasPriority(t Task) bool + func FilterNotCompleted(t Task) bool + func FilterOverdue(t Task) bool + func WriteToFile(tasklist *TaskList, file *os.File) error + func WriteToPath(tasklist *TaskList, filename string) error + type Predicate func(Task) bool + func FilterByContext(context string) Predicate + func FilterByPriority(priority string) Predicate + func FilterByProject(project string) Predicate + func FilterNot(predicate Predicate) Predicate + type Task struct + AdditionalTags map[string]string + Completed bool + CompletedDate time.Time + Contexts []string + CreatedDate time.Time + DueDate time.Time + ID int + Original string + Priority string + Projects []string + Todo string + func NewTask() Task + func ParseTask(text string) (*Task, error) + func (task *Task) Complete() + func (task *Task) Due() time.Duration + func (task *Task) HasAdditionalTags() bool + func (task *Task) HasCompletedDate() bool + func (task *Task) HasContexts() bool + func (task *Task) HasCreatedDate() bool + func (task *Task) HasDueDate() bool + func (task *Task) HasPriority() bool + func (task *Task) HasProjects() bool + func (task *Task) IsCompleted() bool + func (task *Task) IsDueToday() bool + func (task *Task) IsOverdue() bool + func (task *Task) Reopen() + func (task *Task) Segments() []*TaskSegment + func (task *Task) Task() string + func (task Task) String() string + type TaskList []Task + func LoadFromFile(file *os.File) (TaskList, error) + func LoadFromPath(filename string) (TaskList, error) + func NewTaskList() TaskList + func (tasklist *TaskList) AddTask(task *Task) + func (tasklist *TaskList) Filter(predicate Predicate, predicates ...Predicate) *TaskList + func (tasklist *TaskList) GetTask(id int) (*Task, error) + func (tasklist *TaskList) LoadFromFile(file *os.File) error + func (tasklist *TaskList) LoadFromPath(filename string) error + func (tasklist *TaskList) RemoveTask(task Task) error + func (tasklist *TaskList) RemoveTaskByID(id int) error + func (tasklist *TaskList) Sort(flag int, flags ...int) error + func (tasklist *TaskList) WriteToFile(file *os.File) error + func (tasklist *TaskList) WriteToPath(filename string) error + func (tasklist TaskList) String() (text string) + type TaskSegment struct + Display string + Originals []string + Type TaskSegmentType + type TaskSegmentType int + const SegmentCompletedDate + const SegmentContext + const SegmentCreatedDate + const SegmentDueDate + const SegmentIsCompleted + const SegmentPriority + const SegmentProject + const SegmentTag + const SegmentTodoText