diff --git a/store/cas.go b/store/cas.go index 3e9fade3..43134a56 100644 --- a/store/cas.go +++ b/store/cas.go @@ -26,12 +26,12 @@ func NewCheckAndSet() *CheckAndSet { func (c *CheckAndSet) Begin() error { if c.state.CompareAndSwap(0, 1) { return nil - } else { - return ErrCASConflict } + return ErrCASConflict } // End exits the critical section. func (c *CheckAndSet) End() { c.state.Store(0) } +