@@ -260,22 +260,17 @@ func TestSlice(t *testing.T) {
260260 var wg sync.WaitGroup
261261
262262 // Concurrent appends
263− for i := 0; i < numGoroutines; i++ {
264− wg.Add(1)
263+ for i := range numGoroutines {
264+ wg.Add(2)
265265 go func(start int) {
266266 defer wg.Done()
267− for j := 0; j < itemsPerGoroutine; j++ {
267+ for j := range itemsPerGoroutine {
268268 s.Append(start*itemsPerGoroutine + j)
269269 }
270270 }(i)
271− }
272−
273− // Concurrent reads
274− for i := 0; i < numGoroutines; i++ {
275− wg.Add(1)
276271 go func() {
277272 defer wg.Done()
278− for j := 0; j < itemsPerGoroutine; j++ {
273+ for range itemsPerGoroutine {
279274 s.Len() // Just read the length
280275 }
281276 }()