mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 08:44:17 -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:
@@ -157,7 +157,7 @@ func TestQUICStreamLimits(t *testing.T) {
|
||||
streamsMu := sync.Mutex{}
|
||||
|
||||
// Attempt to open exactly the configured number of streams
|
||||
for i := 0; i < streamCount; i++ {
|
||||
for i := range streamCount {
|
||||
wg.Add(1)
|
||||
go func(idx int) {
|
||||
defer wg.Done()
|
||||
@@ -237,7 +237,7 @@ func TestQUICStreamLimits(t *testing.T) {
|
||||
done := make(chan struct{})
|
||||
|
||||
// Launch goroutines to attempt opening additional streams
|
||||
for i := 0; i < extraCount; i++ {
|
||||
for i := range extraCount {
|
||||
extraWg.Add(1)
|
||||
go func(idx int) {
|
||||
defer extraWg.Done()
|
||||
|
||||
Reference in New Issue
Block a user