errors

package
v2.0.8 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: GPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Code int         `json:"code"` // 状态码
	Msg  string      `json:"msg"`  // 状态消息
	Data interface{} `json:"data"`
}

func (*Message) Error

func (e *Message) Error() string

func (*Message) ErrorCode

func (e *Message) ErrorCode() int

func (*Message) IsSuccess

func (e *Message) IsSuccess() bool

func (*Message) SetData

func (e *Message) SetData(d interface{}) *Message

func (*Message) SetErrorCode

func (e *Message) SetErrorCode(code int) *Message

func (*Message) SetMsg

func (e *Message) SetMsg(s string, prs ...interface{}) *Message

Jump to

Keyboard shortcuts

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