Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NullError = add(0, "") ErrRequest = add(400, "The request is invalid. Please check your input and try again.") // 客户端请求错误 ErrParams = add(422, "Invalid parameters. Please check your input and try again.") // 参数错误 ErrServer = add(500, "An internal server error occurred. Please try again later.") // 服务端错误 )
Functions ¶
Types ¶
type Errors ¶
type Errors interface {
// Error sometimes Error return Code in string form
Error() string
// Code get error code.
Code() int
// Message get code message.
Message() string
// Details get error detail,it may be nil.
Details() []interface{}
// Equal for compatible.
Equal(error) bool
// Reload Message
Reload(string) Error
}
Click to show internal directories.
Click to hide internal directories.