errors

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

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

Go to latest
Published: Oct 8, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Overlap = func(o *options) {
	o.overlap = true
}

Functions

func IsCode

func IsCode(err error, code string) bool

IsCode 判断错误是否属于该错误码

Types

type Error

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

Error 自定义错误码数据结构

func New

func New(code string, e interface{}, opfs ...optionFunc) *Error

func (*Error) Code

func (e *Error) Code() string

func (*Error) Error

func (e *Error) Error() string

func (*Error) String

func (e *Error) String() string

Jump to

Keyboard shortcuts

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