Skip to content

Commit 411b084

Browse files
authored
Replace multierr with errors.Join for error handling (#462)
This reduces an dependency on package not in stdlib.
1 parent 6a7e0af commit 411b084

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

attest/tpm.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ import (
2222
"encoding/asn1"
2323
"encoding/base64"
2424
"encoding/binary"
25+
"errors"
2526
"fmt"
2627
"io"
2728
"net/url"
2829
"strings"
2930

3031
"github.com/google/go-tpm/legacy/tpm2"
3132
"github.com/google/go-tpm/tpmutil"
32-
"go.uber.org/multierr"
3333
)
3434

3535
const (
@@ -349,7 +349,7 @@ func pcrbanks(tpm io.ReadWriter) ([]HashAlg, error) {
349349
for i, v := range vals {
350350
pcrb, ok := v.(tpm2.PCRSelection)
351351
if !ok {
352-
errs = multierr.Append(errs, fmt.Errorf("failed to convert value %d to tpm2.PCRSelection: %v", i, v))
352+
errs = errors.Join(errs, fmt.Errorf("failed to convert value %d to tpm2.PCRSelection: %v", i, v))
353353
continue
354354
}
355355

go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ require (
88
github.com/google/go-cmp v0.7.0
99
github.com/google/go-tpm v0.9.6
1010
github.com/google/go-tpm-tools v0.4.6
11-
go.uber.org/multierr v1.11.0
1211
golang.org/x/sys v0.37.0
1312
)
1413

0 commit comments

Comments
 (0)