build: address 'intrange' linter warning

golangci-lint warns about this:

    for loop can be changed to use an integer range (Go 1.22+)
    (intrange)

Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
Niels de Vos
2024-04-26 10:49:26 +02:00
committed by mergify[bot]
parent 0e7b06e9d0
commit e85914fc0d
10 changed files with 46 additions and 46 deletions

View File

@ -41,11 +41,11 @@ func TestStatChecker(t *testing.T) {
t.Error("checker failed to start")
}
for i := 0; i < 10; i++ {
for i := range 10 {
// check health, should be healthy
healthy, msg := checker.isHealthy()
if !healthy || msg != nil {
t.Error("volume is unhealthy")
t.Errorf("volume is unhealthy after %d tries", i+1)
}
time.Sleep(time.Second)