(ctx context.Context)
| 158 | } |
| 159 | |
| 160 | func FromContext(ctx context.Context) (*Runtime, bool) { |
| 161 | runtime, ok := ctx.Value(runtimeContextKey{}).(*Runtime) |
| 162 | return runtime, ok && runtime != nil |
| 163 | } |
| 164 | |
| 165 | func IOFromContext(ctx context.Context) (IO, bool) { |
| 166 | runtime, ok := FromContext(ctx) |
no outgoing calls