MCPcopy
hub / github.com/gin-gonic/gin / WrapF

Function WrapF

utils.go:47–51  ·  view source on GitHub ↗

WrapF is a helper function for wrapping http.HandlerFunc and returns a Gin middleware.

(f http.HandlerFunc)

Source from the content-addressed store, hash-verified

45
46// WrapF is a helper function for wrapping http.HandlerFunc and returns a Gin middleware.
47func WrapF(f http.HandlerFunc) HandlerFunc {
48 return func(c *Context) {
49 f(c.Writer, c.Request)
50 }
51}
52
53// WrapH is a helper function for wrapping http.Handler and returns a Gin middleware.
54func WrapH(h http.Handler) HandlerFunc {

Callers 1

TestWrapFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestWrapFunction · 0.68