errcode

package
v1.1.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Success ...
	Success = NewError(0, "成功")
)

Functions

This section is empty.

Types

type Error

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

Error ...

func NewError

func NewError(code int, msg string) *Error

NewError ...

func (*Error) Code

func (e *Error) Code() int

Code ...

func (*Error) Details

func (e *Error) Details() []string

Details ...

func (*Error) Error

func (e *Error) Error() string

Error ...

func (*Error) Msg

func (e *Error) Msg() string

Msg ...

func (*Error) WithDetails

func (e *Error) WithDetails(details ...string) *Error

WithDetails ...

Jump to

Keyboard shortcuts

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