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

Function Group

ginS/gins.go:51–53  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.
51func Group(relativePath string, handlers ...gin.HandlerFunc) *gin.RouterGroup {
52 return engine().Group(relativePath, handlers...)
53}
54
55// Handle is a wrapper for Engine.Handle.
56func Handle(httpMethod, relativePath string, handlers ...gin.HandlerFunc) gin.IRoutes {

Callers 1

TestGroupFunction · 0.85

Calls 1

GroupMethod · 0.65

Tested by 1

TestGroupFunction · 0.68