1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-21 11:57:02 +00:00

DBUG API: mark overlapped routes, hide the builtin functionality (read description)

also reference the correct file:line on <autogenerated> (by searching for the file,line of method inside the embedded fields themselves, as go automatically generates the methods foreach struct for their embedded fields)

fix UseGlobal may override the overlap feature
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-08-28 16:02:14 +03:00
parent 0b31b50404
commit 6f9a453160
6 changed files with 80 additions and 21 deletions

View File

@@ -178,9 +178,8 @@ func overlapRoute(r *Route, next *Route) {
ctx.Do(nextHandlers)
}
// NOTE(@kataras): Any UseGlobal call will prepend to this, if they are
// in the same Party then it's expected, otherwise not.
r.beginHandlers = append(context.Handlers{decisionHandler}, r.beginHandlers...)
r.builtinBeginHandlers = append(context.Handlers{decisionHandler}, r.builtinBeginHandlers...)
r.overlappedLink = next
}
// APIBuilder the visible API for constructing the router
@@ -411,7 +410,7 @@ func (api *APIBuilder) handle(errorCode int, method string, relativePath string,
var err error
for _, route = range routes {
if route == nil {
break
continue
}
// global