NewFactory creates a new factory.
(constructor func(name string) (Pair, error))
| 26 | |
| 27 | // NewFactory creates a new factory. |
| 28 | func NewFactory(constructor func(name string) (Pair, error)) *Factory { |
| 29 | return &Factory{ |
| 30 | constructor: constructor, |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | // Make creates an instance under the provided name. It an instance is already |
| 35 | // created and it is not nil, that instance is returned to the caller. |
no outgoing calls