errors

package
v1.1.11 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnauthorized  = New(401, "Unauthorized")
	ErrForbidden     = New(403, "Forbidden")
	ErrInternalError = New(500, "Internal Error")
)
View Source
var DisableDuplicateErrorCheck bool

Functions

func New

func New(code int, msg string) error

func Unwrap

func Unwrap(err error) (code int, msg string)

Types

type Error

type Error struct {
	Code    int    `json:"code,omitempty"`
	Message string `json:"msg,omitempty"`
}

func (*Error) Error

func (e *Error) Error() string

Jump to

Keyboard shortcuts

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