package
0.0.0-20230203010516-6d4bf48beedd
Repository: https://github.com/onyx-protocol/onyx.git
Documentation: pkg.go.dev

# Functions

Data returns the data item in err, if any.
Detail returns the detail message contained in err, if any.
New returns an error that formats as the given text.
NewWriter returns a new Writer that writes to w until an error is returned.
Root returns the original error that was wrapped by one or more calls to Wrap.
Stack returns the stack trace of an error.
Sub returns an error containing root as its root and taking all other metadata (stack trace, detail, message, and data items) from err.
WithData returns a new error that wraps err as a chain error message containing a value of type map[string]interface{} as an extra data item.
WithDetail returns a new error that wraps err as a chain error messsage containing text as its additional context.
WithDetailf is like WithDetail, except it formats the detail message as in fmt.Printf.
Wrap adds a context message and stack trace to err and returns a new error with the new context.
Wrapf is like Wrap, but arguments are handled as in fmt.Printf.

# Structs

Writer is in an implementation of the "sticky error writer" pattern as described in https://blog.golang.org/errors-are-values.