chore: build with Go 1.26; use Go 1.25 features (#10570)

WaitGroup.Go and built-in gomaxprocs handling.

Signed-off-by: Jakob Borg <jakob@kastelo.net>
This commit is contained in:
Jakob Borg
2026-02-11 10:41:38 +00:00
committed by GitHub
parent 478d8a007d
commit dc2a77ab8e
44 changed files with 175 additions and 289 deletions
+4 -10
View File
@@ -378,11 +378,8 @@ func TestUnsubscribeContention(t *testing.T) {
stopListeners := make(chan struct{})
var listenerWg sync.WaitGroup
listenerWg.Add(listeners)
for i := 0; i < listeners; i++ {
go func() {
defer listenerWg.Done()
listenerWg.Go(func() {
s := l.Subscribe(AllEvents)
defer s.Unsubscribe()
@@ -394,7 +391,7 @@ func TestUnsubscribeContention(t *testing.T) {
return
}
}
}()
})
}
// Start senders. These send pointless events until the stop channel is
@@ -403,11 +400,8 @@ func TestUnsubscribeContention(t *testing.T) {
stopSenders := make(chan struct{})
defer close(stopSenders)
var senderWg sync.WaitGroup
senderWg.Add(senders)
for i := 0; i < senders; i++ {
go func() {
defer senderWg.Done()
senderWg.Go(func() {
t := time.NewTicker(time.Millisecond)
for {
@@ -419,7 +413,7 @@ func TestUnsubscribeContention(t *testing.T) {
return
}
}
}()
})
}
// Give everything time to start up.