Documentation ¶
Overview ¶
https://blog.questionable.services/article/http-handler-error-handling-revisited/
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewValidator ¶
func NewValidator() *validator.Validate
Types ¶
type Error ¶
Error represents a handler error. It provides methods for a HTTP status code and embeds the built-in error interface.
type ErrorResponse ¶
ErrorResponse is the client response struct for errors.
type StatusError ¶
StatusError represents an error with an associated HTTP status code.
func (StatusError) Error ¶
func (se StatusError) Error() string
Allows StatusError to satisfy the error interface.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
https://blog.questionable.services/article/guide-logging-middleware-go/
|
https://blog.questionable.services/article/guide-logging-middleware-go/ |
Click to show internal directories.
Click to hide internal directories.