mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
Exclude snapshot changes
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
committed by
mergify[bot]
parent
e8e9208987
commit
5e6aebee58
29
vendor/github.com/pkg/errors/cause.go
generated
vendored
29
vendor/github.com/pkg/errors/cause.go
generated
vendored
@ -1,29 +0,0 @@
|
||||
// +build !go1.13
|
||||
|
||||
package errors
|
||||
|
||||
// Cause recursively unwraps an error chain and returns the underlying cause of
|
||||
// the error, if possible. An error value has a cause if it implements the
|
||||
// following interface:
|
||||
//
|
||||
// type causer interface {
|
||||
// Cause() error
|
||||
// }
|
||||
//
|
||||
// If the error does not implement Cause, the original error will
|
||||
// be returned. 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 {
|
||||
cause, ok := err.(causer)
|
||||
if !ok {
|
||||
break
|
||||
}
|
||||
err = cause.Cause()
|
||||
}
|
||||
return err
|
||||
}
|
26
vendor/github.com/pkg/errors/errors.go
generated
vendored
26
vendor/github.com/pkg/errors/errors.go
generated
vendored
@ -260,3 +260,29 @@ func (w *withMessage) Format(s fmt.State, verb rune) {
|
||||
io.WriteString(s, w.Error())
|
||||
}
|
||||
}
|
||||
|
||||
// Cause returns the underlying cause of the error, if possible.
|
||||
// An error value has a cause if it implements the following
|
||||
// interface:
|
||||
//
|
||||
// type causer interface {
|
||||
// Cause() error
|
||||
// }
|
||||
//
|
||||
// If the error does not implement Cause, the original error will
|
||||
// be returned. 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 {
|
||||
cause, ok := err.(causer)
|
||||
if !ok {
|
||||
break
|
||||
}
|
||||
err = cause.Cause()
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
33
vendor/github.com/pkg/errors/go113.go
generated
vendored
33
vendor/github.com/pkg/errors/go113.go
generated
vendored
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user