diff --git a/receiver/chronyreceiver/go.mod b/receiver/chronyreceiver/go.mod index 39f8be6e6dbc..a0117f1d5b04 100644 --- a/receiver/chronyreceiver/go.mod +++ b/receiver/chronyreceiver/go.mod @@ -15,7 +15,6 @@ require ( go.opentelemetry.io/otel/metric v1.26.0 go.opentelemetry.io/otel/trace v1.26.0 go.uber.org/goleak v1.3.0 - go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 ) @@ -49,6 +48,7 @@ require ( go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect go.opentelemetry.io/otel/sdk v1.26.0 // indirect go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect + go.uber.org/multierr v1.11.0 // indirect golang.org/x/net v0.24.0 // indirect golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect diff --git a/receiver/chronyreceiver/internal/chrony/client.go b/receiver/chronyreceiver/internal/chrony/client.go index 81b36838b7a3..159ed37f3959 100644 --- a/receiver/chronyreceiver/internal/chrony/client.go +++ b/receiver/chronyreceiver/internal/chrony/client.go @@ -12,7 +12,6 @@ import ( "github.com/facebook/time/ntp/chrony" "github.com/tilinna/clock" - "go.uber.org/multierr" ) var ( @@ -80,11 +79,11 @@ func (c *client) GetTrackingData(ctx context.Context) (*Tracking, error) { packet.SetSequence(uint32(clock.Now(ctx).UnixNano())) if err := binary.Write(sock, binary.BigEndian, packet); err != nil { - return nil, multierr.Combine(err, sock.Close()) + return nil, errors.Join(err, sock.Close()) } data := make([]uint8, 1024) if _, err := sock.Read(data); err != nil { - return nil, multierr.Combine(err, sock.Close()) + return nil, errors.Join(err, sock.Close()) } if err := sock.Close(); err != nil { diff --git a/receiver/chronyreceiver/internal/chrony/util.go b/receiver/chronyreceiver/internal/chrony/util.go index 86932714fcd3..3e7db9ecbfb4 100644 --- a/receiver/chronyreceiver/internal/chrony/util.go +++ b/receiver/chronyreceiver/internal/chrony/util.go @@ -9,8 +9,6 @@ import ( "net" "os" "strings" - - "go.uber.org/multierr" ) var ( @@ -30,7 +28,7 @@ func SplitNetworkEndpoint(addr string) (network, endpoint string, err error) { case "udp": host, _, err := net.SplitHostPort(endpoint) if err != nil { - return "", "", fmt.Errorf("issue parsing endpoint: %w", multierr.Combine(ErrInvalidNetwork, err)) + return "", "", fmt.Errorf("issue parsing endpoint: %w", errors.Join(ErrInvalidNetwork, err)) } if host == "" { return "", "", fmt.Errorf("missing hostname: %w", ErrInvalidNetwork)