MCPcopy Create free account
hub / github.com/DoNewsCode/core / Populate

Method Populate

otes/dependency_test.go:21–30  ·  view source on GitHub ↗
(target interface{})

Source from the content-addressed store, hash-verified

19type Populator struct{}
20
21func (p Populator) Populate(target interface{}) error {
22 g := dig.New()
23 g.Provide(func() log.Logger {
24 return log.NewNopLogger()
25 })
26 g.Provide(func() opentracing.Tracer {
27 return opentracing.NoopTracer{}
28 })
29 return di.IntoPopulator(g).Populate(target)
30}
31
32func TestNewEsFactory(t *testing.T) {
33 if os.Getenv("ELASTICSEARCH_ADDR") == "" {

Callers

nothing calls this directly

Calls 3

IntoPopulatorFunction · 0.92
ProvideMethod · 0.80
PopulateMethod · 0.65

Tested by

no test coverage detected