modernize: Use b.Loop (introduced in Go 1.24)

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
Paweł Gronowski
2025-12-15 17:51:24 +01:00
parent 239a49d403
commit c9b0a21bb1
15 changed files with 40 additions and 41 deletions

View File

@@ -151,8 +151,8 @@ func BenchmarkTail(b *testing.B) {
b.Fatal(err)
}
}
b.ResetTimer()
for i := 0; i < b.N; i++ {
for b.Loop() {
if _, err := TailFile(f, 1000); err != nil {
b.Fatal(err)
}