linting fixes

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2019-12-03 22:59:44 +03:00
parent 7d5bdcf993
commit a1eaf9cc20
41 changed files with 76 additions and 80 deletions

View File

@@ -61,7 +61,7 @@ func (m *memoryLock) Acquire(id string, opts ...lock.AcquireOption) error {
// set a timer for the leftover ttl
if live > lk.ttl {
// release the lock if it expired
m.Release(id)
_ = m.Release(id)
} else {
ttl = time.After(live)
}
@@ -94,7 +94,7 @@ lockLoop:
break lockLoop
case <-ttl:
// ttl exceeded
m.Release(id)
_ = m.Release(id)
// TODO: check the ttl again above
ttl = nil
// try acquire