Group creates a new router group. You should add all the routes that have common middlewares or the same path prefix. For example, all the routes that use a common middleware for authorization could be grouped.
(relativePath string, handlers ...gin.HandlerFunc)
| 49 | // Group creates a new router group. You should add all the routes that have common middlewares or the same path prefix. |
| 50 | // For example, all the routes that use a common middleware for authorization could be grouped. |
| 51 | func Group(relativePath string, handlers ...gin.HandlerFunc) *gin.RouterGroup { |
| 52 | return engine().Group(relativePath, handlers...) |
| 53 | } |
| 54 | |
| 55 | // Handle is a wrapper for Engine.Handle. |
| 56 | func Handle(httpMethod, relativePath string, handlers ...gin.HandlerFunc) gin.IRoutes { |