Skip to content

Commit

Permalink
use errors.Join
Browse files Browse the repository at this point in the history
  • Loading branch information
khushijain21 committed May 29, 2024
1 parent 9a7d3c0 commit a40deac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions bridges/otelzap/encoder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.uber.org/multierr"
"go.uber.org/zap/zapcore"

"go.opentelemetry.io/otel/log"
Expand Down Expand Up @@ -243,7 +242,7 @@ func (t turduckens) MarshalLogArray(enc zapcore.ArrayEncoder) error {
var err error
tur := turducken{}
for i := 0; i < int(t); i++ {
err = multierr.Append(err, enc.AppendObject(tur))
err = errors.Join(err, enc.AppendObject(tur))
}
return err
}
Expand Down
2 changes: 1 addition & 1 deletion bridges/otelzap/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ go 1.21
require (
github.com/stretchr/testify v1.9.0
go.opentelemetry.io/otel/log v0.3.0
go.uber.org/multierr v1.11.0
go.uber.org/zap v1.27.0
)

Expand All @@ -17,5 +16,6 @@ require (
go.opentelemetry.io/otel v1.27.0 // indirect
go.opentelemetry.io/otel/metric v1.27.0 // indirect
go.opentelemetry.io/otel/trace v1.27.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

0 comments on commit a40deac

Please sign in to comment.