package
0.0.10
Repository: https://github.com/kingstonduy/go-core.git
Documentation: pkg.go.dev

# README

USAGE

1. Default errors
Error NameStatus (int)Error Code (string)Message
Success200 OK00Successful
Failed200 OK01Failed. %s
ValidationError200 OK02Validation error. %s
NotFoundError200 OK03Not found error. %s
OutboundError200 OK04Outbound error. %s
TimeoutError200 OK05Timeout error. %s
BadRequestError200 OK06Bad request error. %s
UnauthorizedError200 OK07Unauthorized error. %s
ForbiddenError200 OK08Forbidden error. %s
MethodNotAllowedError200 OK09Method not allowed error. %s
ConflictError200 OK10Conflict error. %s
TooManyRequestError200 OK11Too many request error. %s
InternalServerError500 Internal Server Error999Internal server error. %s
2. Create dynamic func error
	var (
		UserNotActive = NewError(400, "54", "User not active")
	)

	func UserNotFound(userId int) error {
		return NewError(400, "54", "User not found %d", userId)
	}

# Functions

As finds the first error in err's chain that matches *Error.
No description provided by the author
authentication error with details.
Bad request error.
Bad request error with details.
Conflict error.
Conflict error with details.
No description provided by the author
Failed error.
Failed error with details.
Forbidden error.
Forbidden error with details.
FromError try to convert go error to *Error.
Internal server error.
Internal server error with details.
Method not allowed error.
Method not allowed error with details.
No description provided by the author
No description provided by the author
No row affected error.
No row affected error with details.
Not found error.
Not found error with details.
Outbound error.
Outbound error with details.
Parse tries to parse a JSON string into an error.
suspended error.
suspended error with details.
Timeout error.
Timeout error with details.
Too many request error.
Too many request error with details.
Unauthorized error.
Unauthorized error with details.
Deprecated: Used Failed with instead.
Validation error.
Validation error with details.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author