README ¶ errors wrap caller stacks into err, similar to pkg/errors. Feature Unlike github.com/pkg/errors, multiple packaging caller stacks, this only packs the first time stack. This also applies to go.uber.org/zap. Expand ▾ Collapse ▴ Documentation ¶ Index ¶ func Errorf(format string, args ...interface{}) error func New(msg string) error func WithStack(err error) error func Wrap(err error, msg string) error func Wrapf(err error, format string, args ...interface{}) error type Error Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Errorf ¶ added in v1.0.2 func Errorf(format string, args ...interface{}) error Errorf create a new error func New ¶ func New(msg string) error New create a new error func WithStack ¶ func WithStack(err error) error WithStack add caller stack information func Wrap ¶ func Wrap(err error, msg string) error Wrap with some extra message into err func Wrapf ¶ func Wrapf(err error, format string, args ...interface{}) error Wrapf with some extra message into err Types ¶ type Error ¶ type Error interface { error // contains filtered or unexported methods } Error a error with caller stack information Source Files ¶ View all Source files err.go Click to show internal directories. Click to hide internal directories.