mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 00:34:24 -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:
@@ -242,7 +242,7 @@ func TestDial_MultipleCallsAfterStop(t *testing.T) {
|
||||
tr.Stop()
|
||||
time.Sleep(50 * time.Millisecond)
|
||||
|
||||
for i := 0; i < 3; i++ {
|
||||
for i := range 3 {
|
||||
_, _, err := tr.Dial("udp")
|
||||
if err == nil {
|
||||
t.Errorf("Attempt %d: %s: %s", i+1, testMsgExpectedError, testMsgUnexpectedNilError)
|
||||
|
||||
Reference in New Issue
Block a user