1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-22 20:37:05 +00:00
This commit is contained in:
Makis Maropoulos
2016-07-08 19:41:50 +02:00
parent 52099314e6
commit 6761d58e53
4 changed files with 21 additions and 8 deletions

View File

@@ -1153,10 +1153,12 @@ type (
Method() string
// Path returns the path
Path() string
// SetPath changes/sets the path for the Route
// SetPath changes/sets the path for this route
SetPath(string)
// Middleware returns the slice of Handler([]Handler) registed to this route
Middleware() Middleware
// SetMiddleware changes/sets the middleware(handler(s)) for this route
SetMiddleware(Middleware)
}
route struct {
@@ -1254,6 +1256,10 @@ func (r route) Middleware() Middleware {
return r.middleware
}
func (r *route) SetMiddleware(m Middleware) {
r.middleware = m
}
const (
// subdomainIndicator where './' exists in a registed path then it contains subdomain
subdomainIndicator = "./"