WrapF is a helper function for wrapping http.HandlerFunc and returns a Gin middleware.
(f http.HandlerFunc)
| 45 | |
| 46 | // WrapF is a helper function for wrapping http.HandlerFunc and returns a Gin middleware. |
| 47 | func 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. |
| 54 | func WrapH(h http.Handler) HandlerFunc { |