tpl/tmplimpl/template: Change defer RLock to RUnlock

This commit is contained in:
BurtonQin 2020-04-21 06:00:21 -04:00 committed by Bjørn Erik Pedersen
parent 736f84b2d5
commit 5146dc614f

View file

@ -783,7 +783,7 @@ func (t templateNamespace) Clone(lock bool) *templateNamespace {
func (t *templateNamespace) Lookup(name string) (tpl.Template, bool) { func (t *templateNamespace) Lookup(name string) (tpl.Template, bool) {
if t.mu != nil { if t.mu != nil {
t.mu.RLock() t.mu.RLock()
defer t.mu.RLock() defer t.mu.RUnlock()
} }
templ, found := t.templates[name] templ, found := t.templates[name]