MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / WithRequestID

Function WithRequestID

internal/logging/requestid.go:27–29  ·  view source on GitHub ↗

WithRequestID returns a new context with the request ID attached.

(ctx context.Context, requestID string)

Source from the content-addressed store, hash-verified

25
26// WithRequestID returns a new context with the request ID attached.
27func WithRequestID(ctx context.Context, requestID string) context.Context {
28 return context.WithValue(ctx, requestIDKey{}, requestID)
29}
30
31// GetRequestID retrieves the request ID from the context.
32// Returns empty string if not found.

Calls

no outgoing calls