plugins: modernize: rangeint

go install golang.org/x/tools/go/analysis/passes/modernize/cmd/modernize@latest
    modernize -rangeint -fix ./...

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2026-03-15 14:56:20 +01:00
parent 96326ad1f7
commit b35d9ea929
2 changed files with 2 additions and 2 deletions

View File

@@ -317,7 +317,7 @@ type checker interface {
func generateBlobs(t checker, nblobs, maxsize int64) map[digest.Digest][]byte {
blobs := map[digest.Digest][]byte{}
for i := int64(0); i < nblobs; i++ {
for range nblobs {
p := make([]byte, randutil.Int63n(maxsize))
if _, err := rand.Read(p); err != nil {

View File

@@ -85,7 +85,7 @@ func TestDeletionThreshold(t *testing.T) {
// Increment deletion count 5, checking GC hasn't run in
// between each call
for i := 0; i < 5; i++ {
for range 5 {
time.Sleep(time.Millisecond)
if c := tc.runCount(); c != 0 {
t.Fatalf("GC ran unexpectedly")