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 -8
View File
@@ -463,11 +463,9 @@ func TestDeregisterOnFailInPull(t *testing.T) {
copyChan, copyWg := startCopier(t.Context(), f, pullChan, finisherBufferChan)
var pullWg sync.WaitGroup
pullWg.Add(1)
go func() {
pullWg.Go(func() {
f.pullerRoutine(t.Context(), pullChan, finisherBufferChan)
pullWg.Done()
}()
})
go f.finisherRoutine(t.Context(), finisherChan, dbUpdateChan, make(chan string))
defer func() {
// Unblock copier and puller
@@ -1246,10 +1244,8 @@ func cleanupSharedPullerState(s *sharedPullerState) {
func startCopier(ctx context.Context, f *sendReceiveFolder, pullChan chan<- pullBlockState, finisherChan chan<- *sharedPullerState) (chan copyBlocksState, *sync.WaitGroup) {
copyChan := make(chan copyBlocksState)
wg := new(sync.WaitGroup)
wg.Add(1)
go func() {
wg.Go(func() {
f.copierRoutine(ctx, copyChan, pullChan, finisherChan)
wg.Done()
}()
})
return copyChan, wg
}