Documentation ¶
Overview ¶
Package httperr contains some helpers for nicer error handling in http.Handler implementations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HandlerFunc ¶
type HandlerFunc func(http.ResponseWriter, *http.Request) error
HandlerFunc is like http.HandlerFunc, but with a function signature that allows easier error handling.
func (HandlerFunc) ServeHTTP ¶
func (f HandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)
type Responder ¶
type Responder interface { error Respond(http.ResponseWriter) }
Responder represents an error that can emit a useful HTTP error response to an http.ResponseWriter.
Click to show internal directories.
Click to hide internal directories.