mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-31 10:13:14 -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:
		| @@ -30,7 +30,7 @@ func accept(t *testing.T, l net.Listener, count int) { | ||||
| 		t.Fatalf("Server decoder: %s", err) | ||||
| 	} | ||||
|  | ||||
| 	for i := 0; i < count; i++ { | ||||
| 	for range count { | ||||
| 		if _, err := dec.Decode(); err != nil { | ||||
| 			t.Errorf("Server decode: %s", err) | ||||
| 		} | ||||
| @@ -96,7 +96,7 @@ func TestRace(t *testing.T) { | ||||
| 	defer dio.close() | ||||
|  | ||||
| 	wg.Add(count) | ||||
| 	for i := 0; i < count; i++ { | ||||
| 	for range count { | ||||
| 		go func() { | ||||
| 			tmsg := tap.Dnstap_MESSAGE | ||||
| 			dio.Dnstap(&tap.Dnstap{Type: &tmsg}) | ||||
| @@ -147,7 +147,7 @@ func TestReconnect(t *testing.T) { | ||||
| 		wg.Done() | ||||
| 	}() | ||||
|  | ||||
| 	for i := 0; i < count; i++ { | ||||
| 	for range count { | ||||
| 		time.Sleep(100 * time.Millisecond) | ||||
| 		dio.Dnstap(&tmsg) | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user