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
-1
View File
@@ -22,7 +22,6 @@ import (
"golang.org/x/time/rate"
_ "github.com/syncthing/syncthing/lib/automaxprocs"
"github.com/syncthing/syncthing/lib/build"
"github.com/syncthing/syncthing/lib/config"
"github.com/syncthing/syncthing/lib/events"
+2 -9
View File
@@ -158,19 +158,12 @@ func (s *session) Serve() {
}
wg := sync.WaitGroup{}
wg.Add(2)
var err0 error
go func() {
err0 = s.proxy(s.conns[0], s.conns[1])
wg.Done()
}()
wg.Go(func() { err0 = s.proxy(s.conns[0], s.conns[1]) })
var err1 error
go func() {
err1 = s.proxy(s.conns[1], s.conns[0])
wg.Done()
}()
wg.Go(func() { err1 = s.proxy(s.conns[1], s.conns[0]) })
sessionMut.Lock()
activeSessions = append(activeSessions, s)
-1
View File
@@ -15,7 +15,6 @@ import (
"path/filepath"
"time"
_ "github.com/syncthing/syncthing/lib/automaxprocs"
syncthingprotocol "github.com/syncthing/syncthing/lib/protocol"
"github.com/syncthing/syncthing/lib/relay/client"
"github.com/syncthing/syncthing/lib/relay/protocol"