feat(chore): use range over int

More readable range
This commit is contained in:
2025-07-06 11:53:56 +02:00
parent 2da5d9df08
commit 7b875454cb

View File

@@ -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)
}
}