Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SendJSON ¶
func SendJSON(w http.ResponseWriter, data interface{}) error
SendJSON returns a JSON response to the caller, or fails with an error.
func SendString ¶
func SendString(w http.ResponseWriter, message string) error
SendString returns a string response to the caller, or fails with an error.
Types ¶
type HTTPError ¶ added in v0.0.4
type HTTPError struct {
// contains filtered or unexported fields
}
HTTPError allows you to return custom status codes.
Click to show internal directories.
Click to hide internal directories.