example

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Code

func Code(e error) int

Types

type Err

type Err int

Err my custorm error enum

const (
	ErrPlanIsEmpty        Err = 10 + iota // plan is empty
	ErrManualCreateFailed                 // manual create operation failed
	ErrRPCFailed                          // rpc request failed
	ErrStageNotMatched                    // stage not matched
	ErrNoAvailable                        // not available
	ErrUnmarshalFailed                    // json unmarshal failed

	ErrGetFailed      // get data failed
	ErrPlanNotSupport // plan not support
	ErrDBFailed       // db operation failed
)

define error enum consts

func (Err) Error

func (i Err) Error() string

func (Err) String

func (i Err) String() string

type Err2

type Err2 int32
const (
	Err2Name Err2 = 100001 // invalid name
	Err2Addr Err2 = 200001 // invalid addr
)

func (Err2) Error

func (i Err2) Error() string

func (Err2) String

func (i Err2) String() string

Jump to

Keyboard shortcuts

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