package
Version:
v1.8.4-0...-cbac34e
Opens a new window with list of versions in this module.
Published: Sep 10, 2019
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package errors provides simple functions to manipulate errors.
Cause returns the root cause error.
New returns an error that formats as the given text.
Newf returns an error that formats as the given text.
Stack returns the stack callers as string.
It returns an empty string id the <err> does not support stacks.
Wrap wraps error with text.
It returns nil if given err is nil.
Wrapf returns an error annotating err with a stack trace
at the point Wrapf is called, and the format specifier.
It returns nil if given err is nil.
type ApiCause interface {
Cause() error
}
type ApiStack interface {
Stack() string
}
Error is custom error for additional features.
Cause returns the root cause error.
Error implements the interface of Error, it returns the error as string.
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;
Stack returns the stack callers as string.
It returns an empty string id the <err> does not support stacks.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.