Update kubectl kustomize to kyaml/v0.14.1, cmd/config/v0.11.1, api/v0.13.2, kustomize/v5.0.1

This commit is contained in:
natasha41575
2023-03-14 11:40:28 -05:00
parent a9008b502d
commit 09e6e4db1d
128 changed files with 40423 additions and 39692 deletions

View File

@@ -91,6 +91,10 @@ func New(e interface{}) *Error {
// fmt.Errorf("%v"). The skip parameter indicates how far up the stack
// to start the stacktrace. 0 is from the current call, 1 from its caller, etc.
func Wrap(e interface{}, skip int) *Error {
if e == nil {
return nil
}
var err error
switch e := e.(type) {
@@ -117,6 +121,9 @@ func Wrap(e interface{}, skip int) *Error {
// up the stack to start the stacktrace. 0 is from the current call,
// 1 from its caller, etc.
func WrapPrefix(e interface{}, prefix string, skip int) *Error {
if e == nil {
return nil
}
err := Wrap(e, 1+skip)
@@ -132,26 +139,6 @@ func WrapPrefix(e interface{}, prefix string, skip int) *Error {
}
// Is detects whether the error is equal to a given error. Errors
// are considered equal by this function if they are the same object,
// or if they both contain the same error inside an errors.Error.
func Is(e error, original error) bool {
if e == original {
return true
}
if e, ok := e.(*Error); ok {
return Is(e.Err, original)
}
if original, ok := original.(*Error); ok {
return Is(e, original.Err)
}
return false
}
// Errorf creates a new error with the given message. You can use it
// as a drop-in replacement for fmt.Errorf() to provide descriptive
// errors in return values.
@@ -215,3 +202,8 @@ func (err *Error) TypeName() string {
}
return reflect.TypeOf(err.Err).String()
}
// Return the wrapped error (implements api for As function).
func (err *Error) Unwrap() error {
return err.Err
}