From a21cc8dd3dd47afcee9f05153a5b614936e3abc0 Mon Sep 17 00:00:00 2001 From: Manu Mtz-Almeida Date: Mon, 1 Jun 2015 00:15:16 +0200 Subject: [PATCH] Updates HTML render --- render/html.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/render/html.go b/render/html.go index ba9f01a0..160b13cd 100644 --- a/render/html.go +++ b/render/html.go @@ -59,5 +59,9 @@ func (r HTMLDebug) loadTemplate() *template.Template { func (r HTML) Write(w http.ResponseWriter) error { w.Header()["Content-Type"] = htmlContentType - return r.Template.ExecuteTemplate(w, r.Name, r.Data) + if len(r.Name) == 0 { + return r.Template.Execute(w, r.Data) + } else { + return r.Template.ExecuteTemplate(w, r.Name, r.Data) + } }