ref: e54213f5257267ed232b2465337c39ddc8c73388
parent: 4a2a8afff2021c8e967254c76c159147da7e78fa
author: Bjørn Erik Pedersen <[email protected]>
date: Sat Mar 16 05:40:27 EDT 2019
tpl/tplimpl: Fix mutex unlock
--- a/tpl/tplimpl/template.go
+++ b/tpl/tplimpl/template.go
@@ -107,7 +107,7 @@
// 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)