tpl/tplimpl: Fix mutex unlock

This commit is contained in:
Bjørn Erik Pedersen 2019-03-16 09:40:27 +01:00
parent 4a2a8afff2
commit e54213f525
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F

View file

@ -107,7 +107,7 @@ type templateHandler struct {
// template funcs etc. built-in.
func (t *templateHandler) NewTextTemplate() tpl.TemplateParseFinder {
t.mu.Lock()
t.mu.Unlock()
defer t.mu.Unlock()
tt := &textTemplate{t: texttemplate.New("")}
t.extTextTemplates = append(t.extTextTemplates, tt)