WrapH is a helper function for wrapping http.Handler and returns a Gin middleware.
(h http.Handler)
| 52 | |
| 53 | // WrapH is a helper function for wrapping http.Handler and returns a Gin middleware. |
| 54 | func WrapH(h http.Handler) HandlerFunc { |
| 55 | return func(c *Context) { |
| 56 | h.ServeHTTP(c.Writer, c.Request) |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | // H is a shortcut for map[string]any |
| 61 | type H map[string]any |