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)
| 41 | // provided set of elements, if any. The elements are added in the order they |
| 42 | // are passed. |
| 43 | func 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. |
| 54 | func (includes *Includes) Len() int { |
no test coverage detected
searching dependent graphs…