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

View File

@@ -27,7 +27,6 @@ import (
"tailscale.com/util/cibuild"
"tailscale.com/util/eventbus"
"tailscale.com/util/mak"
"tailscale.com/util/multierr"
"tailscale.com/util/usermetric"
"tailscale.com/version"
)
@@ -992,8 +991,8 @@ func (t *Tracker) selfCheckLocked() {
// OverallError returns a summary of the health state.
//
// If there are multiple problems, the error will be of type
// multierr.Error.
// If there are multiple problems, the error will be joined using
// [errors.Join].
func (t *Tracker) OverallError() error {
if t.nil() {
return nil
@@ -1071,7 +1070,7 @@ func (t *Tracker) errorsLocked() []error {
// This function is here for legacy compatibility purposes and is deprecated.
func (t *Tracker) multiErrLocked() error {
errs := t.errorsLocked()
return multierr.New(errs...)
return errors.Join(errs...)
}
var fakeErrForTesting = envknob.RegisterString("TS_DEBUG_FAKE_HEALTH_ERROR")