errors

package
v0.0.0-...-1c8a91e Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	ErrCode int    // 错误码
	ErrMsg  string // 对应错误信息
}

错误码及对应信息的结构体

func NewError

func NewError(code int, msg string) *Error

初始化Error结构体函数

func (*Error) Error

func (err *Error) Error() string

Error结构体方法,返回错误信息,实现了error接口

type error interface {
    Error() string
}

Jump to

Keyboard shortcuts

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