error_code

package
v0.0.0-...-909db3f Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBadRequest = NewErrorCode(40000001, "bad request")
)

error code format: [4|5][000][00][00] client error

View Source
var (
	ErrServerError = NewErrorCode(50000001, "server error")
)

server error

View Source
var OK = NewErrorCode(0, "ok")

Functions

This section is empty.

Types

type ErrorCode

type ErrorCode struct {
	// contains filtered or unexported fields
}

func NewErrorCode

func NewErrorCode(ret int, msg string) ErrorCode

func (ErrorCode) Error

func (c ErrorCode) Error() string

func (ErrorCode) ErrorInfo

func (c ErrorCode) ErrorInfo() (ret int, msg string)

func (ErrorCode) OK

func (c ErrorCode) OK() bool

Jump to

Keyboard shortcuts

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