(ctx context.Context)
| 33 | var templateRegistryCtxKey templateRegistryCtxKeyType |
| 34 | |
| 35 | func templateRegistryFromContext(ctx context.Context) (TemplateRegistry, bool) { |
| 36 | reg, ok := ctx.Value(templateRegistryCtxKey).(TemplateRegistry) |
| 37 | return reg, ok |
| 38 | } |
| 39 | |
| 40 | func newContextWithTemplateRegistry(parent context.Context, reg TemplateRegistry) context.Context { |
| 41 | return context.WithValue(parent, templateRegistryCtxKey, reg) |