mcode

package
v0.0.0-...-9e15026 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Success          = New(0, "success")
	InternalError    = New(500, "internal error")
	ValidationError  = New(400, "validation error")
	Unauthorized     = New(401, "unauthorized")
	Forbidden        = New(403, "forbidden")
	NotFound         = New(404, "not found")
	MethodNotAllowed = New(405, "method not allowed")
)

预定义错误码

Functions

This section is empty.

Types

type Code

type Code interface {
	Code() int
	Message() string
}

Code 错误码接口

func New

func New(c int, m string) Code

Jump to

Keyboard shortcuts

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