NewTasks creates a new instance of Tasks and initializes it with the provided set of elements, if any. The elements are added in the order they are passed.
(els ...*TaskElement)
| 29 | // NewTasks creates a new instance of Tasks and initializes it with the provided |
| 30 | // set of elements, if any. The elements are added in the order they are passed. |
| 31 | func NewTasks(els ...*TaskElement) *Tasks { |
| 32 | tasks := &Tasks{ |
| 33 | om: orderedmap.NewOrderedMap[string, *Task](), |
| 34 | } |
| 35 | for _, el := range els { |
| 36 | tasks.Set(el.Key, el.Value) |
| 37 | } |
| 38 | return tasks |
| 39 | } |
| 40 | |
| 41 | // Len returns the number of variables in the Tasks map. |
| 42 | func (tasks *Tasks) Len() int { |
searching dependent graphs…