MCPcopy
hub / github.com/fabiolb/fabio / find

Method find

route/routes.go:7–14  ·  view source on GitHub ↗

find returns the route with the given path and returns nil if none was found.

(path string)

Source from the content-addressed store, hash-verified

5
6// find returns the route with the given path and returns nil if none was found.
7func (rt Routes) find(path string) *Route {
8 for _, r := range rt {
9 if r.Path == path {
10 return r
11 }
12 }
13 return nil
14}
15
16// sort by path in reverse order (most to least specific)
17func (rt Routes) Len() int { return len(rt) }

Callers 12

addRouteMethod · 0.80
weighRouteMethod · 0.80
routeMethod · 0.80
theDocs.all.min.jsFile · 0.80
cFunction · 0.80
fFunction · 0.80
rFunction · 0.80
hFunction · 0.80
materialize.min.jsFile · 0.80
nFunction · 0.80
iFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected