Documentation
¶
Index ¶
- Variables
- func ErrorText(code int) string
- func HandleError(w http.ResponseWriter, r *http.Request, err error)
- func HandleMiddlewareError(w http.ResponseWriter, r *http.Request, err error, next http.Handler)
- func MethodNotAllowed(method string, allowed ...string) web.Error
- type ErrMethodNotAllowed
- type HandlerError
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = &HandlerError{Code: http.StatusNotFound}
)
Functions ¶
func HandleError ¶
func HandleError(w http.ResponseWriter, r *http.Request, err error)
func HandleMiddlewareError ¶ added in v0.2.0
Types ¶
type ErrMethodNotAllowed ¶
func (*ErrMethodNotAllowed) Error ¶
func (err *ErrMethodNotAllowed) Error() string
func (*ErrMethodNotAllowed) ServeHTTP ¶
func (err *ErrMethodNotAllowed) ServeHTTP(w http.ResponseWriter, _ *http.Request)
func (*ErrMethodNotAllowed) Status ¶
func (err *ErrMethodNotAllowed) Status() int
type HandlerError ¶
Reference Handler error
func (HandlerError) Error ¶
func (err HandlerError) Error() string
func (HandlerError) ServeHTTP ¶
func (err HandlerError) ServeHTTP(w http.ResponseWriter, _ *http.Request)
func (HandlerError) Status ¶
func (err HandlerError) Status() int
func (HandlerError) String ¶
func (err HandlerError) String() string
func (HandlerError) Unwrap ¶
func (err HandlerError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.