diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-01-23 06:15:18 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-23 06:15:18 -0800 |
commit | f037f24b67c4fd95c9b85ecf40a7ba6d9c7dd7f6 (patch) | |
tree | 96665286b569c8cf79f43ef9adad7f1502eefbed /vendor/github.com/pkg/errors/go113.go | |
parent | 8098cbbee192e644de505e62c4aa0341f4acb4a5 (diff) | |
parent | 587a25fd8a9f903ffc45d6ca7442da3966f7443c (diff) | |
download | podman-f037f24b67c4fd95c9b85ecf40a7ba6d9c7dd7f6.tar.gz podman-f037f24b67c4fd95c9b85ecf40a7ba6d9c7dd7f6.tar.bz2 podman-f037f24b67c4fd95c9b85ecf40a7ba6d9c7dd7f6.zip |
Merge pull request #4947 from containers/dependabot/go_modules/github.com/containers/storage-1.15.7
build(deps): bump github.com/containers/storage from 1.15.5 to 1.15.7
Diffstat (limited to 'vendor/github.com/pkg/errors/go113.go')
-rw-r--r-- | vendor/github.com/pkg/errors/go113.go | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/vendor/github.com/pkg/errors/go113.go b/vendor/github.com/pkg/errors/go113.go index ed0dc7a6d..be0d10d0c 100644 --- a/vendor/github.com/pkg/errors/go113.go +++ b/vendor/github.com/pkg/errors/go113.go @@ -36,36 +36,3 @@ func As(err error, target interface{}) bool { return stderrors.As(err, target) } func Unwrap(err error) error { return stderrors.Unwrap(err) } - -// Cause recursively unwraps an error chain and returns the underlying cause of -// the error, if possible. There are two ways that an error value may provide a -// cause. First, the error may implement the following interface: -// -// type causer interface { -// Cause() error -// } -// -// Second, the error may return a non-nil value when passed as an argument to -// the Unwrap function. This makes Cause forwards-compatible with Go 1.13 error -// chains. -// -// If an error value satisfies both methods of unwrapping, Cause will use the -// causer interface. -// -// If the error is nil, nil will be returned without further investigation. -func Cause(err error) error { - type causer interface { - Cause() error - } - - for err != nil { - if cause, ok := err.(causer); ok { - err = cause.Cause() - } else if unwrapped := Unwrap(err); unwrapped != nil { - err = unwrapped - } else { - break - } - } - return err -} |