createComponent creates a new component instance with the given definition.
(def *Definition, cond ...Condition)
| 39 | |
| 40 | // createComponent creates a new component instance with the given definition. |
| 41 | func createComponent(def *Definition, cond ...Condition) *Component { |
| 42 | return &Component{ |
| 43 | definition: def, |
| 44 | conditions: cond, |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | // attachCondition attaches a condition to the component. |
| 49 | func (c *Component) attachCondition(cond Condition) { |
no outgoing calls