Skip to content

Commit

Permalink
remove the MPL2.0 license pkg (#563)
Browse files Browse the repository at this point in the history
* Removed unnecessary dependencies, leading to a cleaner and more efficient project structure.
  • Loading branch information
CaiYueTing authored Jul 24, 2024
1 parent de76143 commit 0fb01be
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
2 changes: 0 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ go 1.20

require (
github.com/dsnet/golib/memfile v1.0.0
github.com/hashicorp/go-multierror v1.1.1
github.com/pion/dtls/v2 v2.2.8-0.20240701035148-45e16a098c47
github.com/pion/transport/v3 v3.0.2
github.com/stretchr/testify v1.9.0
Expand All @@ -16,7 +15,6 @@ require (

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/pion/logging v0.2.2 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
golang.org/x/crypto v0.24.0 // indirect
Expand Down
5 changes: 0 additions & 5 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dsnet/golib/memfile v1.0.0 h1:J9pUspY2bDCbF9o+YGwcf3uG6MdyITfh/Fk3/CaEiFs=
github.com/dsnet/golib/memfile v1.0.0/go.mod h1:tXGNW9q3RwvWt1VV2qrRKlSSz0npnh12yftCSCy2T64=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I=
github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
github.com/pion/dtls/v2 v2.2.8-0.20240701035148-45e16a098c47 h1:WCUn5hJZLLMoOvedDEDA/OFzaYbZy7G71mQ9h5GiQ/o=
github.com/pion/dtls/v2 v2.2.8-0.20240701035148-45e16a098c47/go.mod h1:8eXNLDNOiXaHvo/wOFnFcr/yinEimCDUQ512tlOSvPo=
github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY=
Expand Down
8 changes: 3 additions & 5 deletions message/pool/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"fmt"
"io"

multierror "github.com/hashicorp/go-multierror"
"github.com/plgd-dev/go-coap/v3/message"
"github.com/plgd-dev/go-coap/v3/message/codes"
"github.com/plgd-dev/go-coap/v3/net"
Expand Down Expand Up @@ -617,13 +616,12 @@ func (r *Message) Clone(msg *Message) error {
}
_, err = io.Copy(buf, r.Body())
if err != nil {
var errs *multierror.Error
errs = multierror.Append(errs, err)
errs := []error{err}
_, errS := r.Body().Seek(n, io.SeekStart)
if errS != nil {
errs = multierror.Append(errs, errS)
errs = append(errs, errS)
}
return errs.ErrorOrNil()
return errors.Join(errs...)
}
_, err = r.Body().Seek(n, io.SeekStart)
if err != nil {
Expand Down

0 comments on commit 0fb01be

Please sign in to comment.