Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseJSONInto ¶
Can be called when already having a var of type T. Unmarshals data into the target.
func SendErrorJSON ¶
func SendErrorJSON(w http.ResponseWriter, status int, msg string) error
Sends structured json error. As marshal can fail, it returns error.
Types ¶
type ErrorResponse ¶
type ErrorResponse struct {
Error string `json:"error"` // Error message with json tag
}
Simple error response struct with json notation.
Click to show internal directories.
Click to hide internal directories.