Skip to content

Commit

Permalink
Merge pull request #2518 from thaJeztah/19.03_backport_bump_pkg_errors
Browse files Browse the repository at this point in the history
[19.03 backport] vendor: pkg/errors v0.9.1
  • Loading branch information
silvin-lubecki authored May 11, 2020
2 parents 052a71c + 9a57ea8 commit ae2012c
Show file tree
Hide file tree
Showing 8 changed files with 106 additions and 20 deletions.
5 changes: 5 additions & 0 deletions cli-plugins/manager/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ func (e *pluginError) Cause() error {
return e.cause
}

// Unwrap provides compatibility for Go 1.13 error chains.
func (e *pluginError) Unwrap() error {
return e.cause
}

// MarshalText marshalls the pluginError into a textual form.
func (e *pluginError) MarshalText() (text []byte, err error) {
return []byte(e.cause.Error()), nil
Expand Down
2 changes: 1 addition & 1 deletion cli-plugins/manager/error_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func TestPluginError(t *testing.T) {
inner := fmt.Errorf("testing")
err = wrapAsPluginError(inner, "wrapping")
assert.Error(t, err, "wrapping: testing")
assert.Equal(t, inner, errors.Cause(err))
assert.Assert(t, errors.Is(err, inner))

actual, err := yaml.Marshal(err)
assert.NilError(t, err)
Expand Down
2 changes: 1 addition & 1 deletion cli/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func TestEmptyFile(t *testing.T) {
assert.NilError(t, err)

_, err = Load(tmpHome)
assert.Equal(t, errors.Cause(err), io.EOF)
assert.Assert(t, errors.Is(err, io.EOF))
assert.ErrorContains(t, err, ConfigFileName)
}

Expand Down
2 changes: 1 addition & 1 deletion vendor.conf
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ github.com/opencontainers/image-spec d60099175f88c47cd379c4738d15
github.com/opencontainers/runc 425e105d5a03fabd737a126ad93d62a9eeede87f # v1.0.0-rc8
github.com/opencontainers/runtime-spec 29686dbc5559d93fb1ef402eeda3e35c38d75af4 # v1.0.1-59-g29686db
github.com/opentracing/opentracing-go 1361b9cd60be79c4c3a7fa9841b3c132e40066a7
github.com/pkg/errors ba968bfe8b2f7e042a574c888954fccecfa385b4 # v0.8.1
github.com/pkg/errors 614d223910a179a466c1767a985424175c39b465 # v0.9.1
github.com/prometheus/client_golang c5b7fccd204277076155f10851dad72b76a49317 # v0.8.0
github.com/prometheus/client_model 6f3806018612930941127f2a7c6c453ba2c527d2
github.com/prometheus/common 7600349dcfe1abd18d72d3a1770870d9800a7801
Expand Down
11 changes: 9 additions & 2 deletions vendor/github.com/pkg/errors/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion vendor/github.com/pkg/errors/errors.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 38 additions & 0 deletions vendor/github.com/pkg/errors/go113.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

58 changes: 44 additions & 14 deletions vendor/github.com/pkg/errors/stack.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ae2012c

Please sign in to comment.