Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ERROR ¶
func ERROR(w http.ResponseWriter, statusCode int, err error)
ERROR generates a response in json from an error
func JSON ¶
func JSON(w http.ResponseWriter, statusCode int, data interface{})
JSON generates a web response in json
Types ¶
type ErrorResponse ¶
type ErrorResponse struct {
Error string `json:"error"`
}
Click to show internal directories.
Click to hide internal directories.