@@ -27,15 +27,15 @@ func TestMap(t *testing.T) {
2727 }{
2828 {
2929 name : "DoubleIntegers" ,
30- elems : []interface {} {1 , 2 , 3 , 4 , 5 , 6 },
30+ elems : []any {1 , 2 , 3 , 4 , 5 , 6 },
3131 mapper : func (i any ) any {
3232 return i .(int ) * 2
3333 },
3434 want : []any {2 , 4 , 6 , 8 , 10 , 12 },
3535 },
3636 {
3737 name : "MapStructs" ,
38- elems : []interface {} {testStructA {Value : 2 }, testStructA {Value : 4 }, testStructA {Value : 6 }},
38+ elems : []any {testStructA {Value : 2 }, testStructA {Value : 4 }, testStructA {Value : 6 }},
3939 mapper : func (i any ) any {
4040 return testStructB {Value : i .(testStructA ).Value * 2 }
4141 },
@@ -75,7 +75,7 @@ func TestMapConcurrentWithContext(t *testing.T) {
7575 {
7676 name : "DoubleIntegers" ,
7777 ctx : context .Background (),
78- elems : []interface {} {1 , 2 , 3 , 4 , 5 , 6 },
78+ elems : []any {1 , 2 , 3 , 4 , 5 , 6 },
7979 mapper : func (_ context.Context , i any ) any {
8080 return i .(int ) * 2
8181 },
@@ -84,7 +84,7 @@ func TestMapConcurrentWithContext(t *testing.T) {
8484 {
8585 name : "MapStructs" ,
8686 ctx : context .Background (),
87- elems : []interface {} {testStructA {Value : 2 }, testStructA {Value : 4 }, testStructA {Value : 6 }},
87+ elems : []any {testStructA {Value : 2 }, testStructA {Value : 4 }, testStructA {Value : 6 }},
8888 mapper : func (_ context.Context , i any ) any {
8989 return testStructB {Value : i .(testStructA ).Value * 2 }
9090 },
@@ -93,7 +93,7 @@ func TestMapConcurrentWithContext(t *testing.T) {
9393 {
9494 name : "SlowMapper" ,
9595 ctx : tCtx ,
96- elems : []interface {} {1 , 2 , 4 , 8 , 16 , 32 },
96+ elems : []any {1 , 2 , 4 , 8 , 16 , 32 },
9797 mapper : func (_ context.Context , i any ) any {
9898 ii := i .(int )
9999 time .Sleep (time .Duration (ii ) * time .Second )
@@ -104,7 +104,7 @@ func TestMapConcurrentWithContext(t *testing.T) {
104104 {
105105 name : "AlreadyCancelledContext" ,
106106 ctx : cCtx ,
107- elems : []interface {} {1 , 2 , 4 , 8 , 16 , 32 },
107+ elems : []any {1 , 2 , 4 , 8 , 16 , 32 },
108108 mapper : func (_ context.Context , i any ) any {
109109 return i .(int ) * 2
110110 },
@@ -128,15 +128,15 @@ func TestMapConcurrent(t *testing.T) {
128128 }{
129129 {
130130 name : "DoubleIntegers" ,
131- elems : []interface {} {1 , 2 , 3 , 4 , 5 , 6 },
131+ elems : []any {1 , 2 , 3 , 4 , 5 , 6 },
132132 mapper : func (i any ) any {
133133 return i .(int ) * 2
134134 },
135135 want : []any {2 , 4 , 6 , 8 , 10 , 12 },
136136 },
137137 {
138138 name : "MapStructs" ,
139- elems : []interface {} {testStructA {Value : 2 }, testStructA {Value : 4 }, testStructA {Value : 6 }},
139+ elems : []any {testStructA {Value : 2 }, testStructA {Value : 4 }, testStructA {Value : 6 }},
140140 mapper : func (i any ) any {
141141 return testStructB {Value : i .(testStructA ).Value * 2 }
142142 },
0 commit comments