WithScope sets a custom scope string for the component definition.
(scope string)
| 150 | |
| 151 | // WithScope sets a custom scope string for the component definition. |
| 152 | func WithScope(scope string) DefinitionOption { |
| 153 | return func(def *Definition) error { |
| 154 | def.scope = scope |
| 155 | return nil |
| 156 | } |
| 157 | } |
| 158 | |
| 159 | // AsSingleton marks the component definition to use singleton scope. |
| 160 | func AsSingleton() DefinitionOption { |
no outgoing calls