Categorygithub.com/audricimanuel/errorutils
modulepackage
1.1.1
Repository: https://github.com/audricimanuel/errorutils.git
Documentation: pkg.go.dev

# README

errorutils

This package helps you to define any error you got when doing any process as an HTTP error with its status code and message. You can also customize the error message but still with the same HTTP status code.

# Functions

No description provided by the author
GetJsonTagInStruct to get the JSON tag of struct field.
GetStatusCode to get status code from any errors.
GetValidatorController return validator controller.
NewHttpError creating new custom error that implements error object, with both customized status code (HTTP status) and message.
ToHttpError converting any errors to HttpError.
ValidatePayload to validate payload when using tag 'validate' (returning HttpError).
ValidateStruct to validate struct using Go Validator.

# Constants

# Variables

# Structs

No description provided by the author

# Interfaces

No description provided by the author