Default severity: error
Deferring Lock or RLock immediately after acquiring the same lock is
almost always a typo for deferring Unlock or RUnlock and is likely to
deadlock when the function returns.
Bad
mutex.Lock()
defer mutex.Lock()Good
mutex.Lock()
defer mutex.Unlock()