Documentation ¶
Overview ¶
Package httputil provide useful functions to handle http response.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteResponse ¶
WriteResponse writes the response data or an error into HTTP reponse.
Types ¶
type ErrResponse ¶
type ErrResponse struct { // Code defines the business error code. Code int `json:"code"` // Message defines the user-safe error message. Message string `json:"message"` }
ErrResponse defines the return messages when an error occurred.
Click to show internal directories.
Click to hide internal directories.