# Functions
HandleErrors returns a function that can be used to convert an ErrorHandler into an http.Handler.
HandleJSON returns a function that can be used to convert an JSONHandler into an http.Handler.
WriteError returns a function that can be used to write an error to a ResponseWriter and set the HTTP status code.
WriteJSON writes the given value to the ResponseWriter and sets the HTTP status to the given code.
# Type aliases
ErrorHandler is like http.Handler except it returns an error which may be returned as the error body of the response.
ErrorToResponse represents a function that can convert a Go error into a form that can be returned as a JSON body from an HTTP request.
JSONHandler is like http.Handler except that it returns a body (to be converted to JSON) and an error.