RunFromContext returns the debug run context stored in ctx.
(ctx context.Context)
| 43 | |
| 44 | // RunFromContext returns the debug run context stored in ctx. |
| 45 | func RunFromContext(ctx context.Context) (*RunContext, bool) { |
| 46 | rc, ok := ctx.Value(runContextKey{}).(*RunContext) |
| 47 | if !ok { |
| 48 | return nil, false |
| 49 | } |
| 50 | return rc, true |
| 51 | } |
| 52 | |
| 53 | // ContextWithStep stores sc in ctx. |
| 54 | func ContextWithStep(ctx context.Context, sc *StepContext) context.Context { |