tpl/tmplimpl/template: Change defer RLock to RUnlock
authorBurtonQin <bobbqqin@gmail.com>
Tue, 21 Apr 2020 10:00:21 +0000 (06:00 -0400)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 21 Apr 2020 11:23:31 +0000 (13:23 +0200)
tpl/tplimpl/template.go

index c01b621369a12c127fa7f1adf90c3e8cd60044b4..81b62b3427ff8a4249d1e31a29bb284c220700c4 100644 (file)
@@ -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]