Documentation ¶ Index ¶ func Is(err error, target error) bool type Error func New(args ...string) *Error func Newf(code string, format string, args ...interface{}) *Error func (err *Error) Error() string Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Is ¶ func Is(err error, target error) bool Types ¶ type Error ¶ type Error struct { Code string `json:"code,omitempty"` Msg string `json:"msg"` } Error type for a new application error func New ¶ func New(args ...string) *Error New - create a new error two arguments can be passed! 1. code 2. message if only one argument is passed its considered as message if two arguments are passed then first argument is considered for code and second argument is considered for message func Newf ¶ func Newf(code string, format string, args ...interface{}) *Error func (*Error) Error ¶ func (err *Error) Error() string Source Files ¶ View all Source files errors.go Click to show internal directories. Click to hide internal directories.