commit e54213f5257267ed232b2465337c39ddc8c73388
parent 4a2a8afff2021c8e967254c76c159147da7e78fa
Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date: Sat, 16 Mar 2019 09:40:27 +0100
tpl/tplimpl: Fix mutex unlock
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tpl/tplimpl/template.go b/tpl/tplimpl/template.go
@@ -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)