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

Function ExampleC_AddModule_simple

example_test.go:34–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32}
33
34func ExampleC_AddModule_simple() {
35 type Foo struct{}
36 c := core.New()
37 c.AddModule(Foo{})
38 fmt.Printf("%T\n", c.Modules()...)
39 // Output:
40 // core_test.Foo
41}
42
43func ExampleC_AddModule_inject() {
44 type Foo struct {

Callers

nothing calls this directly

Calls 4

NewFunction · 0.92
ModulesMethod · 0.65
AddModuleMethod · 0.45
PrintfMethod · 0.45

Tested by

no test coverage detected