all: use Go 1.22 range-over-int

Updates #11058

Change-Id: I35e7ef9b90e83cac04ca93fd964ad00ed5b48430
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2024-04-16 13:15:13 -07:00
committed by Brad Fitzpatrick
parent 068db1f972
commit 7c1d6e35a5
143 changed files with 280 additions and 282 deletions

View File

@@ -70,7 +70,7 @@ func (nt *notifyThrottler) drain(count int) []ipn.Notify {
nt.mu.Unlock()
nn := []ipn.Notify{}
for i := 0; i < count; i++ {
for i := range count {
select {
case n := <-ch:
nn = append(nn, n)
@@ -1039,7 +1039,7 @@ func TestWGEngineStatusRace(t *testing.T) {
// we would end up in state ipn.Running.
// The same should thus be true if these callbacks occur concurrently.
var wg sync.WaitGroup
for i := 0; i < 100; i++ {
for i := range 100 {
wg.Add(1)
go func(i int) {
defer wg.Done()