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

Method BasePath

routergroup.go:82–84  ·  view source on GitHub ↗

BasePath returns the base path of router group. For example, if v := router.Group("/rest/n/v1/api"), v.BasePath() is "/rest/n/v1/api".

()

Source from the content-addressed store, hash-verified

80// BasePath returns the base path of router group.
81// For example, if v := router.Group("/rest/n/v1/api"), v.BasePath() is "/rest/n/v1/api".
82func (group *RouterGroup) BasePath() string {
83 return group.basePath
84}
85
86func (group *RouterGroup) handle(httpMethod, relativePath string, handlers HandlersChain) IRoutes {
87 absolutePath := group.calculateAbsolutePath(relativePath)

Callers 2

TestRouterGroupBasicFunction · 0.80
performRequestInGroupFunction · 0.80

Calls

no outgoing calls

Tested by 2

TestRouterGroupBasicFunction · 0.64
performRequestInGroupFunction · 0.64