Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit 435e762

Browse files
Merge pull request #2518 from thaJeztah/19.03_backport_bump_pkg_errors
[19.03 backport] vendor: pkg/errors v0.9.1 Upstream-commit: ae2012ccedef0981ae448582cd1519dd39fcc2f3 Component: cli
2 parents 38cd618 + 085915a commit 435e762

8 files changed

Lines changed: 106 additions & 20 deletions

File tree

components/cli/cli-plugins/manager/error.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ func (e *pluginError) Cause() error {
2525
return e.cause
2626
}
2727

28+
// Unwrap provides compatibility for Go 1.13 error chains.
29+
func (e *pluginError) Unwrap() error {
30+
return e.cause
31+
}
32+
2833
// MarshalText marshalls the pluginError into a textual form.
2934
func (e *pluginError) MarshalText() (text []byte, err error) {
3035
return []byte(e.cause.Error()), nil

components/cli/cli-plugins/manager/error_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func TestPluginError(t *testing.T) {
1616
inner := fmt.Errorf("testing")
1717
err = wrapAsPluginError(inner, "wrapping")
1818
assert.Error(t, err, "wrapping: testing")
19-
assert.Equal(t, inner, errors.Cause(err))
19+
assert.Assert(t, errors.Is(err, inner))
2020

2121
actual, err := yaml.Marshal(err)
2222
assert.NilError(t, err)

components/cli/cli/config/config_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func TestEmptyFile(t *testing.T) {
8080
assert.NilError(t, err)
8181

8282
_, err = Load(tmpHome)
83-
assert.Equal(t, errors.Cause(err), io.EOF)
83+
assert.Assert(t, errors.Is(err, io.EOF))
8484
assert.ErrorContains(t, err, ConfigFileName)
8585
}
8686

components/cli/vendor.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ github.com/opencontainers/image-spec d60099175f88c47cd379c4738d15
6262
github.com/opencontainers/runc 425e105d5a03fabd737a126ad93d62a9eeede87f # v1.0.0-rc8
6363
github.com/opencontainers/runtime-spec 29686dbc5559d93fb1ef402eeda3e35c38d75af4 # v1.0.1-59-g29686db
6464
github.com/opentracing/opentracing-go 1361b9cd60be79c4c3a7fa9841b3c132e40066a7
65-
github.com/pkg/errors ba968bfe8b2f7e042a574c888954fccecfa385b4 # v0.8.1
65+
github.com/pkg/errors 614d223910a179a466c1767a985424175c39b465 # v0.9.1
6666
github.com/prometheus/client_golang c5b7fccd204277076155f10851dad72b76a49317 # v0.8.0
6767
github.com/prometheus/client_model 6f3806018612930941127f2a7c6c453ba2c527d2
6868
github.com/prometheus/common 7600349dcfe1abd18d72d3a1770870d9800a7801

components/cli/vendor/github.com/pkg/errors/README.md

Lines changed: 9 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/cli/vendor/github.com/pkg/errors/errors.go

Lines changed: 7 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/cli/vendor/github.com/pkg/errors/go113.go

Lines changed: 38 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/cli/vendor/github.com/pkg/errors/stack.go

Lines changed: 44 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)