Documentation ¶
Overview ¶
Package httputil provides utilities useful when dealing with http responses.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResponseError ¶
type ResponseError struct { // Message shall be an informative message about the error. Message string `json:"message"` }
ResponseError shall be used when an error response shall be returned.
func NewResponseError ¶
func NewResponseError(msg string) *ResponseError
NewResponseError creates a new ResponseError.
func (*ResponseError) JSON ¶
func (re *ResponseError) JSON() string
JSON formats a ResponseError to JSON.
Click to show internal directories.
Click to hide internal directories.