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

Method MatchPath

router.go:195–201  ·  view source on GitHub ↗
(ctx Context, routePath string)

Source from the content-addressed store, hash-verified

193}
194
195func (r *router) MatchPath(ctx Context, routePath string) bool {
196 if root := r.Nodes[ctx.Request().Method]; root != nil {
197 n := root.getNode(routePath)
198 return n == ctx.RouterNode().Node()
199 }
200 return false
201}
202
203func (r *router) getNode(httpMethod string, routePath string) *Node {
204 if root := r.Nodes[httpMethod]; root != nil {

Callers

nothing calls this directly

Calls 4

RequestMethod · 0.65
NodeMethod · 0.65
RouterNodeMethod · 0.65
getNodeMethod · 0.45

Tested by

no test coverage detected