chore: update code format. (#628)

This commit is contained in:
Bo-Yi Wu
2021-04-15 19:49:17 +08:00
committed by GitHub
parent 7e087de6e6
commit afd9ff889e
68 changed files with 390 additions and 414 deletions

View File

@@ -53,7 +53,8 @@ func NewRedisLock(store *Redis, key string) *RedisLock {
func (rl *RedisLock) Acquire() (bool, error) {
seconds := atomic.LoadUint32(&rl.seconds)
resp, err := rl.store.Eval(lockCommand, []string{rl.key}, []string{
rl.id, strconv.Itoa(int(seconds)*millisPerSecond + tolerance)})
rl.id, strconv.Itoa(int(seconds)*millisPerSecond + tolerance),
})
if err == red.Nil {
return false, nil
} else if err != nil {