package
0.0.0-20231205094324-6f9dc6eabeef
Repository: https://github.com/lwzphper/go-mall.git
Documentation: pkg.go.dev

# Functions

As finds the first error in err's chain that matches target, and if so, sets target to that error value and returns true.
BadRequest new BadRequest error that is mapped to a 400 response.
ClientClosed new ClientClosed error that is mapped to an HTTP 499 response.
Clone deep clone error to a new error.
Code returns the http code for an error.
Conflict new Conflict error that is mapped to a 409 response.
Errorf returns an error object for the code, message and error info.
Forbidden new Forbidden error that is mapped to a 403 response.
FromError try to convert an error to *Error.
GatewayTimeout new GatewayTimeout error that is mapped to an HTTP 504 response.
InternalServer new InternalServer error that is mapped to a 500 response.
Is reports whether any error in err's chain matches target.
IsBadRequest determines if err is an error which indicates a BadRequest error.
IsClientClosed determines if err is an error which indicates a IsClientClosed error.
IsConflict determines if err is an error which indicates a Conflict error.
IsForbidden determines if err is an error which indicates a Forbidden error.
IsGatewayTimeout determines if err is an error which indicates a GatewayTimeout error.
IsInternalServer determines if err is an error which indicates an Internal error.
IsNotFound determines if err is an error which indicates an NotFound error.
IsServiceUnavailable determines if err is an error which indicates an Unavailable error.
IsUnauthorized determines if err is an error which indicates an Unauthorized error.
New returns an error object for the code, message.
Newf New(code fmt.Sprintf(format, a...)).
NotFound new NotFound error that is mapped to a 404 response.
Reason returns the reason for a particular error.
ServiceUnavailable new ServiceUnavailable error that is mapped to an HTTP 503 response.
Unauthorized new Unauthorized error that is mapped to a 401 response.
Unwrap returns the result of calling the Unwrap method on err, if err's type contains an Unwrap method returning error.

# Constants

SupportPackageIsVersion1 this constant should not be referenced by any other code.
UnknownCode is unknown code for error info.
UnknownReason is unknown reason for error info.

# Structs

No description provided by the author