-
Notifications
You must be signed in to change notification settings - Fork 26
Closed
Labels
Description
Hi @joeybloggs ,
I'm doing some testing with this router, and I found an issue.
Here is an example:
a := server.Group("/a", aM)
a.Get("/test", func(ctx *internal.Ctx) {
ctx.JSON(http.StatusOK, "a-ok")
})
b := a.Group("/b", bM)
b.Get("/test", func(ctx *internal.Ctx) {
ctx.JSON(http.StatusOK, "b-ok")
})
c := b.Group("/c", cM)
c.Get("/test", func(ctx *internal.Ctx) {
ctx.JSON(http.StatusOK, "c-ok")
})
func aM(ctx *internal.Ctx) {
ctx.Next()
}
func bM(ctx *internal.Ctx) {
ctx.Next()
}
func cM(ctx *internal.Ctx) {
ctx.Next()
}
And this is the behavior:
/a/test
executes theaM
. Everthing OK./a/b/test
executes onlybM
, it does not executeaM
. But it should./a/b/c/test
executes onlycM
, it does not executeaM
andbM
. But it should execute them all.
If this is a bug, I hope it will be fixed ASAP. From a lot of routers out there this one seems pretty good to me, and this issue is blocking me to migrate to it.