1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-08 04:21:57 +00:00
Former-commit-id: 5576c44b64014fb00dd79e618b815b5f52b705e4
This commit is contained in:
Gerasimos Maropoulos
2018-03-10 14:22:56 +02:00
parent 1165b4527a
commit 4993918a12
11 changed files with 131 additions and 364 deletions

View File

@@ -147,9 +147,10 @@ func (router *Router) ServeHTTP(w http.ResponseWriter, r *http.Request) {
router.mainHandler(w, r)
}
// RouteExists checks if a route exists
func (router *Router) RouteExists(method, path string, ctx context.Context) bool {
return router.requestHandler.RouteExists(method, path, ctx)
// RouteExists reports whether a particular route exists
// It will search from the current subdomain of context's host, if not inside the root domain.
func (router *Router) RouteExists(ctx context.Context, method, path string) bool {
return router.requestHandler.RouteExists(ctx, method, path)
}
type wrapper struct {