MCPcopy Create free account
hub / github.com/alecthomas/devtodo2 / CreateTaskView

Function CreateTaskView

view.go:41–51  ·  view source on GitHub ↗
(node TaskNode, options *ViewOptions)

Source from the content-addressed store, hash-verified

39}
40
41func CreateTaskView(node TaskNode, options *ViewOptions) *TaskView {
42 view := &TaskView{
43 tasks: make([]Task, node.Len()),
44 options: options,
45 }
46 for i := 0; i < node.Len(); i++ {
47 view.tasks[i] = node.At(i)
48 }
49 sort.Sort(view)
50 return view
51}
52
53func (t *TaskView) At(i int) Task {
54 return t.tasks[i]

Callers 2

consoleDisplayTaskFunction · 0.85
ShowTreeMethod · 0.85

Calls 2

LenMethod · 0.65
AtMethod · 0.65

Tested by

no test coverage detected