MCPcopy Create free account
hub / github.com/devfeel/dotweb / add

Method add

group.go:132–137  ·  view source on GitHub ↗
(method, path string, handler HttpHandle)

Source from the content-addressed store, hash-verified

130}
131
132func (g *xGroup) add(method, path string, handler HttpHandle) RouterNode {
133 node := g.server.Router().RegisterRoute(method, g.prefix+path, handler)
134 g.allRouterExpress[method+routerExpressSplit+g.prefix+path] = struct{}{}
135 node.Node().groupMiddlewares = g.middlewares
136 return node
137}
138
139// SetNotFoundHandle sets a custom 404 handler for this group.
140// This handler takes priority over the app-level NotFoundHandler.

Callers 8

DELETEMethod · 0.95
GETMethod · 0.95
HEADMethod · 0.95
OPTIONSMethod · 0.95
PATCHMethod · 0.95
POSTMethod · 0.95
PUTMethod · 0.95
RegisterRouteMethod · 0.95

Calls 3

RouterMethod · 0.80
RegisterRouteMethod · 0.65
NodeMethod · 0.65

Tested by

no test coverage detected