WithName sets the name of the component definition.
(name string)
| 142 | |
| 143 | // WithName sets the name of the component definition. |
| 144 | func WithName(name string) DefinitionOption { |
| 145 | return func(def *Definition) error { |
| 146 | def.name = name |
| 147 | return nil |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | // WithScope sets a custom scope string for the component definition. |
| 152 | func WithScope(scope string) DefinitionOption { |
no outgoing calls