MCPcopy
hub / github.com/go-task/task / NewIncludes

Function NewIncludes

taskfile/ast/include.go:43–51  ·  view source on GitHub ↗

NewIncludes creates a new instance of Includes and initializes it with the provided set of elements, if any. The elements are added in the order they are passed.

(els ...*IncludeElement)

Source from the content-addressed store, hash-verified

41// provided set of elements, if any. The elements are added in the order they
42// are passed.
43func NewIncludes(els ...*IncludeElement) *Includes {
44 includes := &Includes{
45 om: orderedmap.NewOrderedMap[string, *Include](),
46 }
47 for _, el := range els {
48 includes.Set(el.Key, el.Value)
49 }
50 return includes
51}
52
53// Len returns the number of includes in the Includes map.
54func (includes *Includes) Len() int {

Callers 4

SetMethod · 0.85
UnmarshalYAMLMethod · 0.85
MergeMethod · 0.85
UnmarshalYAMLMethod · 0.85

Calls 1

SetMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…