Provide adds dependencies provider to the core. Note the dependency provider must be a function in the form of: func(foo Foo) Bar where foo is the upstream dependency and Bar is the provided type. The order for providers doesn't matter. They are only executed lazily when the Invoke is called. Thi
(deps di.Deps)
| 247 | // dependency implements the modular interface. If so, this dependency will be |
| 248 | // added the module collection. |
| 249 | func (c *C) Provide(deps di.Deps) { |
| 250 | for _, dep := range deps { |
| 251 | c.provide(dep) |
| 252 | } |
| 253 | } |
| 254 | |
| 255 | func (c *C) provide(constructor interface{}) { |
| 256 | var ( |