WithTemplateData constructs a *http.Request which has the provided TemplateData attached.
(r *http.Request, data TemplateData)
| 157 | |
| 158 | // WithTemplateData constructs a *http.Request which has the provided TemplateData attached. |
| 159 | func WithTemplateData(r *http.Request, data TemplateData) *http.Request { |
| 160 | return r.WithContext(context.WithValue(r.Context(), templateDataKey, data)) |
| 161 | } |
| 162 | |
| 163 | type appConfigKeyType struct{} |
| 164 |
no test coverage detected