Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewReason ¶
NewReason creates a new error using message and wraps it with reason. The reason can be extracted using Reason().
func Reason ¶
Reason extracts a failure reason from err. err has a reason if it satisfies the failure reason interface:
interface { FailureReason() string }
If err does not have a reason or FailureReason() returns an empty string, ReasonUnknown is returned.
func WithReason ¶
WithReason decorates err with reason. The reason can be extracted using Reason().
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.