From 2a54faf99794dba360dab902c135099e159339b6 Mon Sep 17 00:00:00 2001 From: Kevin Wan Date: Thu, 10 Apr 2025 09:28:42 +0800 Subject: [PATCH] chore: coding style (#4771) --- core/stores/sqlx/orm_test.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/core/stores/sqlx/orm_test.go b/core/stores/sqlx/orm_test.go index cf07cbfd5..fcd0f2e8e 100644 --- a/core/stores/sqlx/orm_test.go +++ b/core/stores/sqlx/orm_test.go @@ -1335,9 +1335,7 @@ func TestAnonymousStructPr(t *testing.T) { } func TestAnonymousStructPrError(t *testing.T) { - dbtest.RunTest(t, func(db *sql.DB, mock sqlmock.Sqlmock) { - type Score struct { Discipline string `db:"discipline"` score uint `db:"score"` @@ -1350,6 +1348,7 @@ func TestAnonymousStructPrError(t *testing.T) { *ClassType Score } + var value []*struct { Age int64 `db:"age"` Class @@ -1375,8 +1374,8 @@ func TestAnonymousStructPrError(t *testing.T) { assert.Equal(t, value[0].score, 0) } }) - dbtest.RunTest(t, func(db *sql.DB, mock sqlmock.Sqlmock) { + dbtest.RunTest(t, func(db *sql.DB, mock sqlmock.Sqlmock) { type Score struct { Discipline string score uint @@ -1389,6 +1388,7 @@ func TestAnonymousStructPrError(t *testing.T) { *ClassType Score } + var value []*struct { Age int64 Class @@ -1414,7 +1414,6 @@ func TestAnonymousStructPrError(t *testing.T) { assert.Equal(t, value[0].score, 0) } }) - } type mockedScanner struct {