errors

package
v0.0.0-...-2cf5803 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	OK           ecode
	NotModified  ecode = -304
	ParamsErr    ecode = -400
	NothingFound ecode = -404
	Conflict     ecode = -409
	ServerErr    ecode = -500
)

ecode error.

Functions

This section is empty.

Types

type Error

type Error interface {
	error
	// Code get error code.
	Code() int
	Equal(error) bool
}

Error error.

func Code

func Code(e error) (ie Error)

Code converts error to ecode.

func Int

func Int(i int) (ie Error)

Int converts int to ecode.

Jump to

Keyboard shortcuts

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