mirror of
https://github.com/nkanaev/yarr.git
synced 2025-05-24 00:33:14 +00:00
fix append (different behaviour in arm)
This commit is contained in:
parent
5e46f1480e
commit
cba3fbc48c
@ -32,10 +32,13 @@ func (r *Router) Use(h Handler) {
|
||||
}
|
||||
|
||||
func (r *Router) For(path string, handler Handler) {
|
||||
chain := make([]Handler, 0)
|
||||
chain = append(chain, r.middle...)
|
||||
chain = append(chain, handler)
|
||||
|
||||
x := Route{}
|
||||
x.regex = routeRegexp(path)
|
||||
x.chain = append(r.middle, handler)
|
||||
|
||||
x.chain = chain
|
||||
r.routes = append(r.routes, x)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user