Documentation
¶
Overview ¶
Package errors provides functions to construct errors with custom fields for structured logging.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendInto ¶
Types ¶
type ErrorBuilder ¶
type ErrorBuilder struct {
// contains filtered or unexported fields
}
func Err ¶
func Err(err error) *ErrorBuilder
func New ¶
func New(msg string) *ErrorBuilder
func WithFields ¶
func WithFields(err error, fields Fields) *ErrorBuilder
func Wrap ¶
func Wrap(prefix string, err error) *ErrorBuilder
func (*ErrorBuilder) E ¶
func (e *ErrorBuilder) E() error
func (*ErrorBuilder) WithField ¶
func (e *ErrorBuilder) WithField(key string, value any) *ErrorBuilder
func (*ErrorBuilder) WithFields ¶
func (e *ErrorBuilder) WithFields(fields Fields) *ErrorBuilder
func (*ErrorBuilder) Wrap ¶
func (e *ErrorBuilder) Wrap(prefix string) *ErrorBuilder
Click to show internal directories.
Click to hide internal directories.