diff options
Diffstat (limited to 'cmd/generate/templates.go.tmpl')
| -rw-r--r-- | cmd/generate/templates.go.tmpl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd/generate/templates.go.tmpl b/cmd/generate/templates.go.tmpl index ff63337..77e8b7d 100644 --- a/cmd/generate/templates.go.tmpl +++ b/cmd/generate/templates.go.tmpl @@ -47,6 +47,10 @@ func hh_{{ $fn.Name }}(w http.ResponseWriter, r *http.Request) { parsed.{{ $f.Name }} = r {{ continue }} {{ end }} + {{ if eq $f.TypeDef "http.ResponseWriter" }} + parsed.{{ $f.Name }} = w + {{ continue }} + {{ end }} {{ $f.Name }}, {{ $f.Name }}Skipped := {{ extractorName $f.Extractor }}(r, {{ $f.NameInReq | quote }}) {{ if not $f.Optional }} if {{ $f.Name }}Skipped { @@ -62,7 +66,7 @@ func hh_{{ $fn.Name }}(w http.ResponseWriter, r *http.Request) { } } {{ end }} - {{ $fn.Name }}(w, parsed) + {{ $fn.Name }}(parsed) {{ if false }} {{ range $_, $f := $fn.RequestTypeFields -}} {{ $f.Name }}: {{ $f.Name }}, |
