summaryrefslogtreecommitdiffstats
path: root/tpl/tplimpl/template.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-03-16 09:40:27 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-03-16 09:40:27 +0100
commite54213f5257267ed232b2465337c39ddc8c73388 (patch)
treec26a3447fd7e6e3c663dbe45f91b50240ded9764 /tpl/tplimpl/template.go
parent4a2a8afff2021c8e967254c76c159147da7e78fa (diff)
tpl/tplimpl: Fix mutex unlock
Diffstat (limited to 'tpl/tplimpl/template.go')
-rw-r--r--tpl/tplimpl/template.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/tpl/tplimpl/template.go b/tpl/tplimpl/template.go
index 8efeb6ce9..26a418108 100644
--- 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)