Skip to content

Commit

Permalink
fix: lint for go1.22.x
Browse files Browse the repository at this point in the history
  • Loading branch information
ginokent committed Mar 24, 2024
1 parent 482bdf9 commit f3797d9
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 11 deletions.
4 changes: 0 additions & 4 deletions pkg/ddl/cockroachdb/lexar_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ func Test_lookupIdent(t *testing.T) {
}

for _, tt := range tests {
tt := tt

t.Run(tt.name, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -176,7 +174,6 @@ func TestLex(t *testing.T) {
}

for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -242,7 +239,6 @@ func TestLexer_NextToken(t *testing.T) {
}

for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()

Expand Down
4 changes: 0 additions & 4 deletions pkg/ddl/cockroachdb/parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,6 @@ CREATE TABLE IF NOT EXISTS complex_defaults (
}{}

for _, tt := range successTests {
tt := tt

t.Run(tt.name, func(t *testing.T) {
// t.Parallel()

Expand Down Expand Up @@ -437,8 +435,6 @@ CREATE TABLE IF NOT EXISTS complex_defaults (
}

for _, tt := range failureTests {
tt := tt

t.Run(tt.name, func(t *testing.T) {
t.Parallel()

Expand Down
2 changes: 1 addition & 1 deletion pkg/ddl/internal/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func GoString(v interface{}) string {

val := reflect.ValueOf(v)
elems := make([]string, typ.NumField())
for i := 0; typ.NumField() > i; i++ {
for i := range typ.NumField() {
elems[i] = fmt.Sprintf("%s:%#v", typ.Field(i).Name, val.Field(i))
}
return fmt.Sprintf("&%s{%s}", typ, strings.Join(elems, ", "))
Expand Down
2 changes: 0 additions & 2 deletions pkg/ddl/mysql/lexar_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ func Test_lookupIdent(t *testing.T) {
}

for _, tt := range tests {
tt := tt

t.Run(tt.name, func(t *testing.T) {
t.Parallel()

Expand Down

0 comments on commit f3797d9

Please sign in to comment.