Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InternalError ¶
func InternalError(req *http.Request, w http.ResponseWriter, err error)
InternalError sends an HTTP 500 with a text/plain message showing the error message It also logs the message.
func NotFound ¶
func NotFound(req *http.Request, w http.ResponseWriter, message string)
NotFound sends an HTTP 404 response with a text/plain message
func RespondWithJSON ¶
func RespondWithJSON(data interface{}, w http.ResponseWriter, req *http.Request)
RespondWithJSON returns a 200 OK with a JSON in the body
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.