WithRequestID returns a new context with the request ID attached.
(ctx context.Context, requestID string)
| 25 | |
| 26 | // WithRequestID returns a new context with the request ID attached. |
| 27 | func 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. |
no outgoing calls