Add request data to template Execute function
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user