NewVars creates a new instance of Vars and initializes it with the provided set of elements, if any. The elements are added in the order they are passed.
(els ...*VarElement)
| 25 | // NewVars creates a new instance of Vars and initializes it with the provided |
| 26 | // set of elements, if any. The elements are added in the order they are passed. |
| 27 | func NewVars(els ...*VarElement) *Vars { |
| 28 | vars := &Vars{ |
| 29 | om: orderedmap.NewOrderedMap[string, Var](), |
| 30 | } |
| 31 | for _, el := range els { |
| 32 | vars.Set(el.Key, el.Value) |
| 33 | } |
| 34 | return vars |
| 35 | } |
| 36 | |
| 37 | // Len returns the number of variables in the Vars map. |
| 38 | func (vars *Vars) Len() int { |
searching dependent graphs…