mirror of https://github.com/gofiber/fiber.git
🌵hybrid routing with tree and fast router
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…
Reference in New Issue