ContextWithStep stores sc in ctx.
(ctx context.Context, sc *StepContext)
| 52 | |
| 53 | // ContextWithStep stores sc in ctx. |
| 54 | func ContextWithStep(ctx context.Context, sc *StepContext) context.Context { |
| 55 | if sc == nil { |
| 56 | panic("chatdebug: nil StepContext") |
| 57 | } |
| 58 | return context.WithValue(ctx, stepContextKey{}, sc) |
| 59 | } |
| 60 | |
| 61 | // StepFromContext returns the debug step context stored in ctx. |
| 62 | func StepFromContext(ctx context.Context) (*StepContext, bool) { |
no outgoing calls