Skip to content

Commit 23befeb

Browse files
remove copyloopvar
It is unnecessary to copy loop variables because these variables have per-iteration scope instead of per-loop scope as it was in Go < 1.22.
1 parent 9058e72 commit 23befeb

File tree

7 files changed

+0
-14
lines changed

7 files changed

+0
-14
lines changed

knownvalue/bool_func_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ func TestBoolFunc_CheckValue(t *testing.T) {
5252
}
5353

5454
for name, testCase := range testCases {
55-
name, testCase := name, testCase
56-
5755
t.Run(name, func(t *testing.T) {
5856
t.Parallel()
5957

knownvalue/float32_func_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ func TestFloat32Func_CheckValue(t *testing.T) {
5757
}
5858

5959
for name, testCase := range testCases {
60-
name, testCase := name, testCase
61-
6260
t.Run(name, func(t *testing.T) {
6361
t.Parallel()
6462

knownvalue/float64_func_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ func TestFloat64Func_CheckValue(t *testing.T) {
5757
}
5858

5959
for name, testCase := range testCases {
60-
name, testCase := name, testCase
61-
6260
t.Run(name, func(t *testing.T) {
6361
t.Parallel()
6462

knownvalue/int32_func_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ func TestInt32Func_CheckValue(t *testing.T) {
5757
}
5858

5959
for name, testCase := range testCases {
60-
name, testCase := name, testCase
61-
6260
t.Run(name, func(t *testing.T) {
6361
t.Parallel()
6462

knownvalue/int64_func_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ func TestInt64Func_CheckValue(t *testing.T) {
5757
}
5858

5959
for name, testCase := range testCases {
60-
name, testCase := name, testCase
61-
6260
t.Run(name, func(t *testing.T) {
6361
t.Parallel()
6462

knownvalue/number_func_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@ func TestNumberFunc_CheckValue(t *testing.T) {
7272
}
7373

7474
for name, testCase := range testCases {
75-
name, testCase := name, testCase
76-
7775
t.Run(name, func(t *testing.T) {
7876
t.Parallel()
7977

knownvalue/string_func_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ func TestStringFunc_CheckValue(t *testing.T) {
5151
}
5252

5353
for name, testCase := range testCases {
54-
name, testCase := name, testCase
55-
5654
t.Run(name, func(t *testing.T) {
5755
t.Parallel()
5856

0 commit comments

Comments
 (0)