Updates HTML render

This commit is contained in:
Manu Mtz-Almeida 2015-06-01 00:15:16 +02:00
parent 4430610795
commit a21cc8dd3d

View File

@ -59,5 +59,9 @@ func (r HTMLDebug) loadTemplate() *template.Template {
func (r HTML) Write(w http.ResponseWriter) error { func (r HTML) Write(w http.ResponseWriter) error {
w.Header()["Content-Type"] = htmlContentType w.Header()["Content-Type"] = htmlContentType
if len(r.Name) == 0 {
return r.Template.Execute(w, r.Data)
} else {
return r.Template.ExecuteTemplate(w, r.Name, r.Data) return r.Template.ExecuteTemplate(w, r.Name, r.Data)
}
} }