Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Explode ¶
Explode iterates on all registered needles if the returned error is not nil, it means the needle found an error he could handle since we iterate with a simple loop on the needles, first appended needles are the first to be used
func Lock ¶
func Lock()
Lock the possibility to add needles to the list should be used at the end of all needles instantiation
Types ¶
type Needle ¶
type Needle interface { // Explode is a function testing all known needles in the giving box // it takes in argument the error that bubbled up. Explode(err error) error }
Needle is a component able to transform a given error into a better one. The analysis of the input error is up to the implementation, as the final returned error is. The implementation shall return nil if the input error is unknown.
type OzzoNeedle ¶
type OzzoNeedle struct {
// contains filtered or unexported fields
}
OzzoNeedle ...
func NewOzzoNeedle ¶
func NewOzzoNeedle() OzzoNeedle
NewOzzoNeedle is the mandatory-to-use OzzoNeedle constructor it instantiates regexp required to ensure details keys are snake case formatted