MCPcopy
hub / github.com/urfave/negroni / HandlerFunc

FuncType HandlerFunc

negroni.go:30–30  ·  view source on GitHub ↗

HandlerFunc is an adapter to allow the use of ordinary functions as Negroni handlers. If f is a function with the appropriate signature, HandlerFunc(f) is a Handler object that calls f.

func(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)

Source from the content-addressed store, hash-verified

28// HandlerFunc is an adapter to allow the use of ordinary functions as Negroni handlers.
29// If f is a function with the appropriate signature, HandlerFunc(f) is a Handler object that calls f.
30type HandlerFunc func(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)
31
32func (h HandlerFunc) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc) {
33 h(rw, r, next)

Callers 8

WrapFunction · 0.85
WrapFuncFunction · 0.85
UseFuncMethod · 0.85
voidMiddlewareFunction · 0.85
TestNegroniWithFunction · 0.85
TestNegroniServeHTTPFunction · 0.85
TestHandlersFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…