MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / WithTemplateData

Function WithTemplateData

pkg/webui/template.go:159–161  ·  view source on GitHub ↗

WithTemplateData constructs a *http.Request which has the provided TemplateData attached.

(r *http.Request, data TemplateData)

Source from the content-addressed store, hash-verified

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

Callers 3

RegisterRoutesMethod · 0.92
RegisterRoutesMethod · 0.92
RegisterRoutesMethod · 0.92

Calls 1

ContextMethod · 0.65

Tested by

no test coverage detected