@@ -260,22 +260,17 @@ func TestSlice(t *testing.T) {
260 var wg sync.WaitGroup
260 var wg sync.WaitGroup
262 // Concurrent appends
262 // Concurrent appends
263− for i := 0; i < numGoroutines; i++ {
263+ for i := range numGoroutines {
264− wg.Add(1)
264+ wg.Add(2)
265 go func(start int) {
265 go func(start int) {
266 defer wg.Done()
266 defer wg.Done()
267− for j := 0; j < itemsPerGoroutine; j++ {
267+ for j := range itemsPerGoroutine {
268 s.Append(start*itemsPerGoroutine + j)
268 s.Append(start*itemsPerGoroutine + j)
274− for i := 0; i < numGoroutines; i++ {
276 go func() {
271 go func() {
277 defer wg.Done()
272 defer wg.Done()
278− for j := 0; j < itemsPerGoroutine; j++ {
273+ for range itemsPerGoroutine {
279 s.Len() // Just read the length
274 s.Len() // Just read the length