MCPcopy Create free account
hub / github.com/conforma/cli / WithTrace

Function WithTrace

internal/tracing/type.go:118–120  ·  view source on GitHub ↗

WithTrace returns the context with the given Trace

(ctx context.Context, t Trace)

Source from the content-addressed store, hash-verified

116
117// WithTrace returns the context with the given Trace
118func WithTrace(ctx context.Context, t Trace) context.Context {
119 return context.WithValue(ctx, contextKey, t)
120}
121
122// FromContext returns the stored Trace in context or Default
123func FromContext(ctx context.Context) Trace {

Callers 2

NewRootCmdFunction · 0.92
TestContextStorageFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestContextStorageFunction · 0.68