Skip to content

Commit 9bd7992

Browse files
committed
Update range loops in benchmarks
1 parent 61c647a commit 9bd7992

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

reader_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ func BenchmarkCity(b *testing.B) {
271271
var city *City
272272

273273
ip := make(net.IP, 4)
274-
for i := 0; i < b.N; i++ {
274+
for range b.N {
275275
randomIPv4Address(r, ip)
276276
city, err = db.City(ip)
277277
if err != nil {
@@ -297,7 +297,7 @@ func BenchmarkASN(b *testing.B) {
297297
var asn *ASN
298298

299299
ip := make(net.IP, 4)
300-
for i := 0; i < b.N; i++ {
300+
for range b.N {
301301
randomIPv4Address(r, ip)
302302
asn, err = db.ASN(ip)
303303
if err != nil {

0 commit comments

Comments
 (0)