@@ -176,7 +176,6 @@ func runTests(t *testing.T, dsn string, tests ...func(dbt *DBTest)) {
176176 cleanupSql := "DROP TABLE IF EXISTS test"
177177
178178 for _ , test := range tests {
179- test := test
180179 t .Run ("default" , func (t * testing.T ) {
181180 dbt := & DBTest {t , db }
182181 t .Cleanup (func () {
@@ -220,8 +219,6 @@ func runTestsParallel(t *testing.T, dsn string, tests ...func(dbt *DBTest, table
220219
221220 t .Parallel ()
222221 for _ , test := range tests {
223- test := test
224-
225222 t .Run ("default" , func (t * testing.T ) {
226223 t .Parallel ()
227224
@@ -491,7 +488,6 @@ func TestMultiQuery(t *testing.T) {
491488 dbt .Error ("no data" )
492489 }
493490 rows .Close ()
494-
495491 })
496492}
497493
@@ -1692,7 +1688,7 @@ func TestTimezoneConversion(t *testing.T) {
16921688
16931689 // Insert local time into database (should be converted)
16941690 newYorkTz , _ := time .LoadLocation ("America/New_York" )
1695- reftime := time .Date (2014 , 05 , 30 , 18 , 03 , 17 , 0 , time .UTC ).In (newYorkTz )
1691+ reftime := time .Date (2014 , 0o5 , 30 , 18 , 0o3 , 17 , 0 , time .UTC ).In (newYorkTz )
16961692 dbt .mustExec ("INSERT INTO test VALUE (?)" , reftime )
16971693
16981694 // Retrieve time from DB
@@ -1974,7 +1970,6 @@ func TestConcurrent(t *testing.T) {
19741970 defer wg .Done ()
19751971
19761972 tx , err := dbt .db .Begin ()
1977-
19781973 if err != nil {
19791974 if err .Error () != "Error 1040: Too many connections" {
19801975 fatalf ("error on conn %d: %s" , id , err .Error ())
@@ -3051,12 +3046,12 @@ func TestRowsColumnTypes(t *testing.T) {
30513046 nfNULL := sql.NullFloat64 {Float64 : 0.0 , Valid : false }
30523047 nf0 := sql.NullFloat64 {Float64 : 0.0 , Valid : true }
30533048 nf1337 := sql.NullFloat64 {Float64 : 13.37 , Valid : true }
3054- nt0 := sql.NullTime {Time : time .Date (2006 , 01 , 02 , 15 , 04 , 05 , 0 , time .UTC ), Valid : true }
3055- nt1 := sql.NullTime {Time : time .Date (2006 , 01 , 02 , 15 , 04 , 05 , 100000000 , time .UTC ), Valid : true }
3056- nt2 := sql.NullTime {Time : time .Date (2006 , 01 , 02 , 15 , 04 , 05 , 110000000 , time .UTC ), Valid : true }
3057- nt6 := sql.NullTime {Time : time .Date (2006 , 01 , 02 , 15 , 04 , 05 , 111111000 , time .UTC ), Valid : true }
3058- nd1 := sql.NullTime {Time : time .Date (2006 , 01 , 02 , 0 , 0 , 0 , 0 , time .UTC ), Valid : true }
3059- nd2 := sql.NullTime {Time : time .Date (2006 , 03 , 04 , 0 , 0 , 0 , 0 , time .UTC ), Valid : true }
3049+ nt0 := sql.NullTime {Time : time .Date (2006 , 0o1 , 0o2 , 15 , 0o4 , 0o5 , 0 , time .UTC ), Valid : true }
3050+ nt1 := sql.NullTime {Time : time .Date (2006 , 0o1 , 0o2 , 15 , 0o4 , 0o5 , 100000000 , time .UTC ), Valid : true }
3051+ nt2 := sql.NullTime {Time : time .Date (2006 , 0o1 , 0o2 , 15 , 0o4 , 0o5 , 110000000 , time .UTC ), Valid : true }
3052+ nt6 := sql.NullTime {Time : time .Date (2006 , 0o1 , 0o2 , 15 , 0o4 , 0o5 , 111111000 , time .UTC ), Valid : true }
3053+ nd1 := sql.NullTime {Time : time .Date (2006 , 0o1 , 0o2 , 0 , 0 , 0 , 0 , time .UTC ), Valid : true }
3054+ nd2 := sql.NullTime {Time : time .Date (2006 , 0o3 , 0o4 , 0 , 0 , 0 , 0 , time .UTC ), Valid : true }
30603055 ndNULL := sql.NullTime {Time : time.Time {}, Valid : false }
30613056 bNULL := []byte (nil )
30623057 nsNULL := sql.NullString {String : "" , Valid : false }
@@ -3071,7 +3066,7 @@ func TestRowsColumnTypes(t *testing.T) {
30713066 bx0 := []byte ("\x00 " )
30723067 bx42 := []byte ("\x42 " )
30733068
3074- var columns = []struct {
3069+ columns : = []struct {
30753070 name string
30763071 fieldType string // type used when creating table schema
30773072 databaseTypeName string // actual type used by MySQL
@@ -3284,7 +3279,7 @@ func TestRawBytesAreNotModified(t *testing.T) {
32843279 const blobSize = defaultBufSize * 3 / 4 // Second row overwrites first row.
32853280 const insertRows = 4
32863281
3287- var sqlBlobs = [2 ]string {
3282+ sqlBlobs : = [2 ]string {
32883283 strings .Repeat (blob , blobSize / len (blob )),
32893284 strings .Repeat (strings .ToUpper (blob ), blobSize / len (blob )),
32903285 }
0 commit comments