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

Function Example

otredis/example_test.go:12–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10)
11
12func Example() {
13 c := core.New()
14 c.ProvideEssentials()
15 c.Provide(otredis.Providers())
16 c.Invoke(func(redisClient redis.UniversalClient) {
17 pong, _ := redisClient.Ping(context.Background()).Result()
18 fmt.Println(pong)
19 })
20 // Output:
21 // PONG
22}

Callers

nothing calls this directly

Calls 5

NewFunction · 0.92
ProvidersFunction · 0.92
ProvideEssentialsMethod · 0.80
ProvideMethod · 0.80
InvokeMethod · 0.80

Tested by

no test coverage detected