diff --git a/src/pkg/html/template/template.go b/src/pkg/html/template/template.go index 02e33e125ab..4657f6ec523 100644 --- a/src/pkg/html/template/template.go +++ b/src/pkg/html/template/template.go @@ -183,7 +183,9 @@ func (t *Template) Lookup(name string) *Template { // Must panics if err is non-nil in the same way as template.Must. func Must(t *Template, err error) *Template { - t.text = template.Must(t.text, err) + if err != nil { + panic(err) + } return t }