Colocate defer statements near relevant functions

Signed-off-by: Goutham Veeramachaneni <goutham@boomerangcommerce.com>
This commit is contained in:
Goutham Veeramachaneni 2017-06-12 14:37:58 +05:30
parent b51a05044e
commit 73cc5bae51

View File

@ -529,8 +529,8 @@ func (a *headAppender) createSeries() error {
base0 := len(a.series)
a.mtx.RUnlock()
a.mtx.Lock()
defer a.mtx.RLock()
a.mtx.Lock()
defer a.mtx.Unlock()
base1 := len(a.series)