errors

package
v0.0.0-...-45f08d6 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2022 License: GPL-3.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Code

func Code(code int, msg string) error

Code NewCode

func HTTP

func HTTP(code int, err ...error) error

HTTP HTTP

func New

func New(msg string) error

New New

Types

type Error

type Error struct {
	ECode   int    `json:"code,omitempty"`
	Message string `json:"message,omitempty"`
}

Error Error

func (*Error) Code

func (e *Error) Code() int

Code Code

func (*Error) Error

func (e *Error) Error() string

Error Error

type HTTPError

type HTTPError struct {
	Code int
	// contains filtered or unexported fields
}

HTTPError Error

func (*HTTPError) Status

func (e *HTTPError) Status() int

Status Status

Jump to

Keyboard shortcuts

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