Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Middleware ¶
type Middleware func(h http.HandlerFunc) http.HandlerFunc
Middleware is function that wraps a http.HandlerFunc.
func NewAccessLogger ¶
func NewAccessLogger(out io.Writer) Middleware
NewAccessLogger can be used to create a middleware that logs every request with client addr, http method and request uri to the given output writer.
func NewPanicRecovery ¶
func NewPanicRecovery(out io.Writer) Middleware
NewPanicRecovery can be used to create middleware that recovers from panics while handling user requests.
Click to show internal directories.
Click to hide internal directories.