errors

package module
v0.0.0-...-d4675f0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 1, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL