From 7b875454cb33ed848df2576e1d096a0ef0a82afc Mon Sep 17 00:00:00 2001 From: Patrice Ferlet Date: Sun, 6 Jul 2025 11:53:56 +0200 Subject: [PATCH] feat(chore): use range over int More readable range --- generator/volume_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/generator/volume_test.go b/generator/volume_test.go index 5fdb636..8f0b78a 100644 --- a/generator/volume_test.go +++ b/generator/volume_test.go @@ -182,8 +182,8 @@ services: w, h := 100, 100 img := image.NewRGBA(image.Rect(0, 0, w, h)) red := color.RGBA{255, 0, 0, 255} - for y := 0; y < h; y++ { - for x := 0; x < w; x++ { + for y := range h { + for x := range w { img.Set(x, y, red) } } @@ -252,8 +252,8 @@ services: w, h := 100, 100 img := image.NewRGBA(image.Rect(0, 0, w, h)) red := color.RGBA{255, 0, 0, 255} - for y := 0; y < h; y++ { - for x := 0; x < w; x++ { + for y := range h { + for x := range w { img.Set(x, y, red) } }