Add request data to template Execute function

This commit is contained in:
2024-08-12 18:55:57 -04:00
parent da5eeb3f0f
commit 8bc58eedbe
3 changed files with 6 additions and 6 deletions

View File

@@ -14,7 +14,7 @@ type Template struct {
htmlTpl *template.Template
}
func (t Template) Execute(w http.ResponseWriter, data interface{}) {
func (t Template) Execute(w http.ResponseWriter, r *http.Request, data interface{}) {
w.Header().Set("Content-Type", "text/html; charset=utf8")
err := t.htmlTpl.Execute(w, data)
if err != nil {