Documentation ¶
Overview ¶
Package errors contains utility functions to deal with errors.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckFakeClientServerSideApplyError ¶
CheckFakeClientServerSideApplyError check if an error is due to the fake client not supporting server-side apply. Warning: it should only be used as a workaround to skip tests for error stemming from fake k8s client, which should be revisited once dependencies are upgraded: "apply patches are not supported in the fake client. Follow https://github.com/kubernetes/kubernetes/issues/115598 for the current status".
func IgnoreAlreadyExists ¶
IgnoreAlreadyExists returns nil on AlreadyExists errors. All other values that are not AlreadyExists errors or nil are returned unmodified.
func IgnoreNoMatchError ¶ added in v0.5.0
IgnoreNoMatchError returns nil on NoMatch errors. All other values that are not NoMatch errors or nil are returned unmodified.
func Must ¶
Must wraps a function call that can return an error. If some error occurred Must has two possible behaviors: panic if debug = true or log the error and return false in order to recover the error. Returns true if no error occurred.
func SetPanicOnErrorMode ¶
func SetPanicOnErrorMode(status bool)
SetPanicOnErrorMode can be used to set or unset the panic mode.
Types ¶
This section is empty.