Skip to content

Commit 1ef9cde

Browse files
committed
modernize BenchmarkReceiveMetadata
1 parent ccdef72 commit 1ef9cde

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

benchmark_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -484,8 +484,8 @@ func BenchmarkReceiveMetadata(b *testing.B) {
484484
db.SetMaxIdleConns(1)
485485

486486
// Create a slice to scan all columns
487-
values := make([]interface{}, 1000)
488-
valuePtrs := make([]interface{}, 1000)
487+
values := make([]any, 1000)
488+
valuePtrs := make([]any, 1000)
489489
for j := range values {
490490
valuePtrs[j] = &values[j]
491491
}
@@ -498,7 +498,7 @@ func BenchmarkReceiveMetadata(b *testing.B) {
498498
defer stmt.Close()
499499

500500
// Benchmark metadata retrieval
501-
for i := 0; i < b.N; i++ {
501+
for range b.N {
502502
rows := tb.checkRows(stmt.Query())
503503

504504
rows.Next()

0 commit comments

Comments
 (0)