on main help sign in
chore: run `modernize`
commit9c45643c1f7f2f61f1537acf80cb07afc9c60023 authorAndrey Nering <andreynering@users.noreply.github.com> dateMon 28 Jul 2025, 14:03 (1 year ago) parent60bcb98
1 file changed+4−4
internal/csync/slices_test.go+4−4
internal/csync/slices_test.go+4−4
@@ -266,22 +266,22 @@ func TestSlice(t *testing.T) {
266266 var wg sync.WaitGroup
267267
268268 // Concurrent appends
269− for i := 0; i < numGoroutines; i++ {
269+ for i := range numGoroutines {
270270 wg.Add(1)
271271 go func(start int) {
272272 defer wg.Done()
273− for j := 0; j < itemsPerGoroutine; j++ {
273+ for j := range itemsPerGoroutine {
274274 s.Append(start*itemsPerGoroutine + j)
275275 }
276276 }(i)
277277 }
278278
279279 // Concurrent reads
280− for i := 0; i < numGoroutines; i++ {
280+ for range numGoroutines {
281281 wg.Add(1)
282282 go func() {
283283 defer wg.Done()
284− for j := 0; j < itemsPerGoroutine; j++ {
284+ for range itemsPerGoroutine {
285285 s.Len() // Just read the length
286286 }
287287 }()