Add staticcheck fixes (#3221)

* Add staticcheck fixes

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* update golangci-lint version

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

---------

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
Sanket Sudake
2025-05-18 22:27:45 +05:30
committed by GitHub
parent 6cc6498844
commit 2b13af0a5e
58 changed files with 228 additions and 226 deletions
+2 -6
View File
@@ -383,7 +383,7 @@ func (roundTripper *RetryingRoundTripper) RoundTrip(req *http.Request) (*http.Re
executingTimeout = executingTimeout * time.Duration(roundTripper.funcHandler.tsRoundTripperParams.timeoutExponent)
}
e := errors.New("Unable to get service url for connection")
e := errors.New("unable to get service url for connection")
logger.Error(e.Error())
return nil, e
}
@@ -510,11 +510,7 @@ func findCeil(randomNumber int, wtDistrList []functionWeightDistribution) string
low := 0
high := len(wtDistrList) - 1
for {
if low >= high {
break
}
for low < high {
mid := low + high/2
if randomNumber >= wtDistrList[mid].sumPrefix {
low = mid + 1