package
0.0.0-20211008155405-f59cc51713ea
Repository: https://github.com/zouchunxu/gof.git
Documentation: pkg.go.dev
# Functions
BadRequest new BadRequest error that is mapped to a 400 response.
Code returns the code for a particular error.
Conflict new Conflict error that is mapped to a 409 response.
Forbidden new Forbidden error that is mapped to a 403 response.
FromError try to convert an error to *Error.
InternalServer new InternalServer error that is mapped to a 500 response.
IsBadRequest determines if err is an error which indicates a BadRequest 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.
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 a Unavailable error.
IsUnauthorized determines if err is an error which indicates a 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.
ServiceUnavailable new ServiceUnavailable error that is mapped to a HTTP 503 response.
Unauthorized new Unauthorized error that is mapped to a 401 response.