MCPcopy
hub / github.com/gofiber/fiber / GetRoute

Method GetRoute

app.go:945–955  ·  view source on GitHub ↗

GetRoute Get route by name

(name string)

Source from the content-addressed store, hash-verified

943
944// GetRoute Get route by name
945func (app *App) GetRoute(name string) Route {
946 for _, routes := range app.stack {
947 for _, route := range routes {
948 if route.Name == name {
949 return *route
950 }
951 }
952 }
953
954 return Route{}
955}
956
957// GetRoutes Get all routes. When filterUseOption equal to true, it will filter the routes registered by the middleware.
958func (app *App) GetRoutes(filterUseOption ...bool) []Route {

Callers 8

RouteMethod · 0.80
Test_App_Route_NamingFunction · 0.80
Test_App_RouteFunction · 0.80
Test_Route_URLFunction · 0.80
Test_Mount_Route_NamesFunction · 0.80
GetRouteURLMethod · 0.80

Calls

no outgoing calls

Tested by 6

Test_App_Route_NamingFunction · 0.64
Test_App_RouteFunction · 0.64
Test_Route_URLFunction · 0.64
Test_Mount_Route_NamesFunction · 0.64