From: BurtonQin Date: Tue, 21 Apr 2020 10:00:21 +0000 (-0400) Subject: tpl/tmplimpl/template: Change defer RLock to RUnlock X-Git-Tag: v0.69.1~7 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=5146dc614fc45df698ebf890af06421dea988c96;p=brevno-suite%2Fhugo tpl/tmplimpl/template: Change defer RLock to RUnlock --- diff --git a/tpl/tplimpl/template.go b/tpl/tplimpl/template.go index c01b6213..81b62b34 100644 --- a/tpl/tplimpl/template.go +++ b/tpl/tplimpl/template.go @@ -783,7 +783,7 @@ func (t templateNamespace) Clone(lock bool) *templateNamespace { func (t *templateNamespace) Lookup(name string) (tpl.Template, bool) { if t.mu != nil { t.mu.RLock() - defer t.mu.RLock() + defer t.mu.RUnlock() } templ, found := t.templates[name]