mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 16:24:19 -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:
@@ -17,7 +17,7 @@ func TestLargeAXFR(t *testing.T) {
|
||||
const numAAAAs = 6553
|
||||
sb.WriteString("example.com. IN SOA . . 1 60 60 60 60\n")
|
||||
sb.WriteString("example.com. IN NS ns.example.\n")
|
||||
for i := 0; i < numAAAAs; i++ {
|
||||
for i := range numAAAAs {
|
||||
sb.WriteString(fmt.Sprintf("%d.example.com. IN AAAA 2001:db8::1\n", i))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user