MCPcopy Index your code
hub / github.com/DoNewsCode/core / Provide

Method Provide

c.go:249–253  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

247// dependency implements the modular interface. If so, this dependency will be
248// added the module collection.
249func (c *C) Provide(deps di.Deps) {
250 for _, dep := range deps {
251 c.provide(dep)
252 }
253}
254
255func (c *C) provide(constructor interface{}) {
256 var (

Callers 15

provideMethod · 0.80
ExampleC_ProvideFunction · 0.80
TestC_DefaultFunction · 0.80
TestC_ProvideFunction · 0.80
TestC_cleanupFunction · 0.80
TestC_AddModuleFunction · 0.80
TestHookFunction · 0.80
ExampleFunction · 0.80
TestIntegrationFunction · 0.80

Calls 1

provideMethod · 0.95

Tested by 15

ExampleC_ProvideFunction · 0.64
TestC_DefaultFunction · 0.64
TestC_ProvideFunction · 0.64
TestC_cleanupFunction · 0.64
TestC_AddModuleFunction · 0.64
TestHookFunction · 0.64
ExampleFunction · 0.64
TestIntegrationFunction · 0.64
TestIntoPopulatorFunction · 0.64