MCPcopy Create free account
hub / github.com/openclaw/gogcli / withDocsTestServiceFactory

Function withDocsTestServiceFactory

internal/cmd/docs_testutil_test.go:154–164  ·  view source on GitHub ↗
(ctx context.Context, factory app.DocsServiceFactory)

Source from the content-addressed store, hash-verified

152}
153
154func withDocsTestServiceFactory(ctx context.Context, factory app.DocsServiceFactory) context.Context {
155 if ctx == nil {
156 ctx = context.Background()
157 }
158 runtime := &app.Runtime{}
159 if existing, ok := app.FromContext(ctx); ok {
160 *runtime = *existing
161 }
162 runtime.Services.Docs = factory
163 return app.WithRuntime(ctx, runtime)
164}
165
166func withDocsTestHTTPClientFactory(ctx context.Context, factory app.DocsHTTPClientFactory) context.Context {
167 if ctx == nil {

Calls 2

FromContextFunction · 0.92
WithRuntimeFunction · 0.92

Tested by

no test coverage detected