syncs: delete WaitGroup and use sync.WaitGroup.Go in Go 1.25

Our own WaitGroup wrapper type was a prototype implementation
for the Go method on the standard sync.WaitGroup type.
Now that there is first-class support for Go,
we should migrate over to using it and delete syncs.WaitGroup.

Updates #cleanup
Updates tailscale/tailscale#16330

Change-Id: Ib52b10f9847341ce29b4ca0da927dc9321691235
Signed-off-by: Joe Tsai <joetsai@digital-static.net>
This commit is contained in:
Joe Tsai
2025-08-28 14:09:01 -07:00
committed by Brad Fitzpatrick
parent f5d3c59a92
commit 3aea0e095a
6 changed files with 9 additions and 26 deletions
+2 -2
View File
@@ -20,6 +20,7 @@ import (
"path"
"path/filepath"
"strings"
"sync"
"sync/atomic"
"time"
"unicode/utf8"
@@ -32,7 +33,6 @@ import (
"tailscale.com/envknob"
"tailscale.com/ipn/ipnstate"
"tailscale.com/net/tsaddr"
"tailscale.com/syncs"
"tailscale.com/tailcfg"
tsrate "tailscale.com/tstime/rate"
"tailscale.com/util/quarantine"
@@ -176,7 +176,7 @@ func runCp(ctx context.Context, args []string) error {
log.Printf("sending %q to %v/%v/%v ...", name, target, ip, stableID)
}
var group syncs.WaitGroup
var group sync.WaitGroup
ctxProgress, cancelProgress := context.WithCancel(ctx)
defer cancelProgress()
if isatty.IsTerminal(os.Stderr.Fd()) {