Documentation ¶
Overview ¶
Package errors contains functionality for creating and wrapping errors with improved formatting compared to the standard Go error functionality.
Index ¶
- func Errorf(format string, args ...interface{}) error
- func New(message string) error
- func SetTopLevelMsg(err error, top string) error
- func SetTopLevelMsgf(err error, format string, args ...interface{}) error
- func WithContext(err error, context string) error
- func WithContextf(err error, format string, args ...interface{}) error
- func Wrap(err error, message string) error
- func Wrapf(err error, format string, args ...interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetTopLevelMsg ¶
SetTopLevelMsg returns a new error with the given top level message. The top level message is the first error message that gets printed when Error() is called on the returned error or any error wrapping it.
func SetTopLevelMsgf ¶
SetTopLevelMsgf returns a new error with the given top level message according to the format specifier. The top level message is the first error message that gets printed when Error() is called on the returned error or any error wrapping it.
func WithContext ¶
WithContext returns a new error adding additional context to err.
func WithContextf ¶
WithContextf returns a new error adding additional context to err according to the format specifier.
Types ¶
This section is empty.