summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Magnusson <mathias@magnusson.space>2026-01-23 19:50:25 +0100
committerMathias Magnusson <mathias@magnusson.space>2026-01-23 19:51:12 +0100
commit8160a5b604ca7bacb19b2bd8b516c47d1828924b (patch)
tree498eed91c7ad781f8fcfc8bffdfcf7cfac97aac2
parent0471eb909e312a1cc3ed8c878c1c050a0ae253bb (diff)
downloadhh-8160a5b604ca7bacb19b2bd8b516c47d1828924b.tar.gz
fix: actually set the raw request when requested
-rw-r--r--cmd/generate/templates.go.tmpl1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmd/generate/templates.go.tmpl b/cmd/generate/templates.go.tmpl
index e1201e0..9bd4e87 100644
--- a/cmd/generate/templates.go.tmpl
+++ b/cmd/generate/templates.go.tmpl
@@ -44,6 +44,7 @@ func hh_{{ $fn.Name }}(w http.ResponseWriter, r *http.Request) {
var parsed {{ $fn.RequestTypeDef }}
{{- range $_, $f := $fn.RequestTypeFields }}
{{ if eq $f.TypeDef "*http.Request" }}
+ parsed.{{ $f.Name }} = r
{{ continue }}
{{ end }}
{{ $f.Name }}, {{ $f.Name }}Skipped := {{ extractorName $f.Extractor }}(r, {{ $f.NameInReq | quote }})