mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 16:54:15 -04:00
lint: enable intrange linter (#7331)
Enable intrange linter to enforce modern Go range syntax over traditional for loops, by converting: for i := 0; i < n; i++ to: for i := range n Adding type conversions where needed for compatibility with existing uint64 parameters. Signed-off-by: Ville Vesilehto <ville@vesilehto.fi>
This commit is contained in:
@@ -63,7 +63,7 @@ func BenchmarkMinimalTTL(b *testing.B) {
|
||||
mt, _ := response.Typify(m, utc)
|
||||
|
||||
b.ResetTimer()
|
||||
for i := 0; i < b.N; i++ {
|
||||
for range b.N {
|
||||
dur := MinimalTTL(m, mt)
|
||||
if dur != 1000*time.Second {
|
||||
b.Fatalf("Wrong MinimalTTL %d, expected %d", dur, 1000*time.Second)
|
||||
|
||||
Reference in New Issue
Block a user