les: changed if-else blocks to conform with golint (#16658)

This commit is contained in:
GagziW
2018-05-03 01:35:06 -07:00
committed by Péter Szilágyi
parent f2447bd4c3
commit 7c02933275
4 changed files with 14 additions and 20 deletions

View File

@ -97,9 +97,8 @@ func (p *testDistPeer) waitBefore(cost uint64) (time.Duration, float64) {
p.lock.RUnlock()
if sumCost < testDistBufLimit {
return 0, float64(testDistBufLimit-sumCost) / float64(testDistBufLimit)
} else {
return time.Duration(sumCost - testDistBufLimit), 0
}
return time.Duration(sumCost - testDistBufLimit), 0
}
func (p *testDistPeer) canQueue() bool {