feat: remove errors package (#1434)
Signed-off-by: Gaius <gaius.qi@gmail.com>
This commit is contained in:
parent
4e57177055
commit
f68ce30f26
2
go.mod
2
go.mod
|
|
@ -45,7 +45,6 @@ require (
|
||||||
github.com/onsi/gomega v1.19.0
|
github.com/onsi/gomega v1.19.0
|
||||||
github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5
|
github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5
|
||||||
github.com/prometheus/client_golang v1.12.2
|
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/schollz/progressbar/v3 v3.8.6
|
||||||
github.com/serialx/hashring v0.0.0-20200727003509-22c0c7ab6b1b
|
github.com/serialx/hashring v0.0.0-20200727003509-22c0c7ab6b1b
|
||||||
github.com/shirou/gopsutil/v3 v3.22.5
|
github.com/shirou/gopsutil/v3 v3.22.5
|
||||||
|
|
@ -168,6 +167,7 @@ require (
|
||||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||||
github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c // indirect
|
github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c // indirect
|
||||||
github.com/prometheus/client_model v0.2.0 // 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/prometheus/procfs v0.7.3 // indirect
|
||||||
github.com/rivo/uniseg v0.2.0 // indirect
|
github.com/rivo/uniseg v0.2.0 // indirect
|
||||||
github.com/robfig/cron/v3 v3.0.1 // indirect
|
github.com/robfig/cron/v3 v3.0.1 // indirect
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,6 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/go-http-utils/headers"
|
"github.com/go-http-utils/headers"
|
||||||
"github.com/pkg/errors"
|
|
||||||
|
|
||||||
"d7y.io/dragonfly/v2/pkg/source"
|
"d7y.io/dragonfly/v2/pkg/source"
|
||||||
)
|
)
|
||||||
|
|
@ -190,7 +189,7 @@ func (client *httpSourceClient) GetMetadata(request *source.Request) (*source.Me
|
||||||
if length != "*" {
|
if length != "*" {
|
||||||
totalContentLength, err = strconv.ParseInt(length, 10, 64)
|
totalContentLength, err = strconv.ParseInt(length, 10, 64)
|
||||||
if err != nil {
|
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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue