Skip to content

Commit

Permalink
feat: remove errors package (#1434)
Browse files Browse the repository at this point in the history
Signed-off-by: Gaius <[email protected]>
  • Loading branch information
gaius-qi authored Jul 5, 2022
1 parent 971dc84 commit e45cdf5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ require (
github.com/onsi/gomega v1.19.0
github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5
github.com/prometheus/client_golang v1.12.2
github.com/prometheus/common v0.35.0
github.com/schollz/progressbar/v3 v3.8.6
github.com/serialx/hashring v0.0.0-20200727003509-22c0c7ab6b1b
github.com/shirou/gopsutil/v3 v3.22.5
Expand Down Expand Up @@ -168,6 +167,7 @@ require (
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.35.0 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/robfig/cron/v3 v3.0.1 // indirect
Expand Down
3 changes: 1 addition & 2 deletions pkg/source/clients/httpprotocol/http_source_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import (
"time"

"github.com/go-http-utils/headers"
"github.com/pkg/errors"

"d7y.io/dragonfly/v2/pkg/source"
)
Expand Down Expand Up @@ -190,7 +189,7 @@ func (client *httpSourceClient) GetMetadata(request *source.Request) (*source.Me
if length != "*" {
totalContentLength, err = strconv.ParseInt(length, 10, 64)
if err != nil {
return nil, errors.Wrapf(err, "convert length from string %q error", length)
return nil, fmt.Errorf("convert length from string %q error: %w", length, err)
}
}
}
Expand Down

0 comments on commit e45cdf5

Please sign in to comment.