mirror of
https://github.com/gofiber/fiber.git
synced 2025-07-11 04:58:58 +00:00
🌵hybrid routing with tree and fast router
This commit is contained in:
parent
df3c48a734
commit
2c6d7e00c4
3
app.go
3
app.go
@ -50,7 +50,8 @@ type Error struct {
|
||||
type App struct {
|
||||
mutex sync.Mutex
|
||||
// Route stack divided by HTTP methods
|
||||
stack [][]*Route
|
||||
stack [][]*Route
|
||||
// Route stack divided by HTTP methods and route prefixes
|
||||
treeStack []map[string][]*Route
|
||||
// Amount of registered routes
|
||||
routesCount int
|
||||
|
@ -356,7 +356,7 @@ func (app *App) addRoute(method string, route *Route) {
|
||||
}
|
||||
}
|
||||
|
||||
// uniqueRouteStack
|
||||
// buildTree build the prefix tree from the previously registered routes
|
||||
func (app *App) buildTree() *App {
|
||||
// loop all the methods and stacks and create the prefix tree
|
||||
for m := range intMethod {
|
||||
|
Loading…
x
Reference in New Issue
Block a user