build: modernize with "go fix -rangeint": use range over int

This commit is contained in:
Nick Craig-Wood
2026-08-21 12:23:31 +01:00
parent 67728ce37d
commit a64c0a0fde
8 changed files with 22 additions and 22 deletions
+1 -1
View File
@@ -2031,7 +2031,7 @@ func (album *Album) fetchPhotosParallel(ctx context.Context, totalPhotos int64)
sem := make(chan struct{}, workers)
var wg sync.WaitGroup
for i := 0; i < numPartitions; i++ {
for i := range numPartitions {
wg.Add(1)
go func(idx int) {
defer wg.Done()
+2 -2
View File
@@ -1191,7 +1191,7 @@ func TestFlushCaches_NoPendingDeltaRace(t *testing.T) {
done := make(chan struct{})
go func() {
defer close(done)
for i := 0; i < 100; i++ {
for range 100 {
lib.deltaMu.Lock()
lib.pendingDelta = &deltaPayload{
records: []json.RawMessage{json.RawMessage(`{"recordName":"m1","recordType":"CPLMaster"}`)},
@@ -1201,7 +1201,7 @@ func TestFlushCaches_NoPendingDeltaRace(t *testing.T) {
lib.applyPendingDelta(context.Background())
}
}()
for i := 0; i < 100; i++ {
for range 100 {
ps.FlushCaches()
// Re-add the library since FlushCaches clears it
ps.mu.Lock()