errcode

package
v0.0.15 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Success = ErrorCode{0, "", nil}
	Failure = ErrorCode{-1, "未知错误", nil}
)

Functions

This section is empty.

Types

type ErrorCode

type ErrorCode struct {
	Code int
	Msg  string
	// contains filtered or unexported fields
}

func (ErrorCode) Error

func (e ErrorCode) Error() string

func (*ErrorCode) MsgOf

func (e *ErrorCode) MsgOf(s string) string

func (ErrorCode) Warp

func (e ErrorCode) Warp(err error) ErrorCode

func (ErrorCode) Warpf

func (e ErrorCode) Warpf(format string, val ...any) ErrorCode

Jump to

Keyboard shortcuts

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