all: use Go 1.20's errors.Join instead of our multierr package

Updates #7123

Change-Id: Ie9be6814831f661ad5636afcd51d063a0d7a907d
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2025-09-30 19:47:50 -07:00
committed by Brad Fitzpatrick
parent 91fa51ca15
commit c2f37c891c
35 changed files with 40 additions and 67 deletions
+3 -4
View File
@@ -28,7 +28,6 @@ import (
"tailscale.com/types/key"
"tailscale.com/types/logger"
"tailscale.com/util/mak"
"tailscale.com/util/multierr"
"tailscale.com/util/singleflight"
)
@@ -295,13 +294,13 @@ func (nc *NoiseClient) Close() error {
nc.connPool = nil
nc.mu.Unlock()
var errors []error
var errs []error
for _, c := range conns {
if err := c.Close(); err != nil {
errors = append(errors, err)
errs = append(errs, err)
}
}
return multierr.New(errors...)
return errors.Join(errs...)
}
// dial opens a new connection to tailcontrol, fetching the server noise key