Updates HTML render

This commit is contained in:
Manu Mtz-Almeida 2015-06-01 00:15:16 +02:00
parent 4430610795
commit a21cc8dd3d
1 changed files with 5 additions and 1 deletions

View File

@ -59,5 +59,9 @@ func (r HTMLDebug) loadTemplate() *template.Template {
func (r HTML) Write(w http.ResponseWriter) error {
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)
}
}