Documentation
¶
Overview ¶
Package errors provides simple functions to manipulate errors.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewText ¶
NewText returns an error that formats as the given text.
func Stack ¶
Stack returns the stack callers as string. It returns an empty string id the <err> does not support stacks.
func Wrap ¶
Wrap wraps error with text. It returns nil if given err is nil.
Types ¶
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error is custom error for additional features.
func (*Error) Error ¶
Error implements the interface of Error, it returns the error as string.
func (*Error) Format ¶
Format formats the frame according to the fmt.Formatter interface.
%v, %s : Print the error string; %-v, %-s : Print current error string; %+s : Print full stack error list; %+v : Print the error string and full stack error list;