all: Bunch of more linter fixes (#5500)

This commit is contained in:
Jakob Borg
2019-02-02 11:02:28 +01:00
committed by GitHub
parent 2111386ee4
commit df5c1eaf01
30 changed files with 118 additions and 117 deletions

View File

@@ -257,17 +257,17 @@ func take(waiter waiter, tokens int) {
if tokens < limiterBurstSize {
// This is the by far more common case so we get it out of the way
// early.
waiter.WaitN(context.TODO(), tokens)
_ = waiter.WaitN(context.TODO(), tokens)
return
}
for tokens > 0 {
// Consume limiterBurstSize tokens at a time until we're done.
if tokens > limiterBurstSize {
waiter.WaitN(context.TODO(), limiterBurstSize)
_ = waiter.WaitN(context.TODO(), limiterBurstSize)
tokens -= limiterBurstSize
} else {
waiter.WaitN(context.TODO(), tokens)
_ = waiter.WaitN(context.TODO(), tokens)
tokens = 0
}
}