Fix #252 typo (middlewares -> middleware)

This commit is contained in:
Javier Provecho Fernandez
2015-07-03 20:12:01 +02:00
parent d6425f1692
commit 7c0c427b2d
5 changed files with 29 additions and 29 deletions
+6 -6
View File
@@ -30,7 +30,7 @@ type routesInterface interface {
}
// Used internally to configure router, a RouterGroup is associated with a prefix
// and an array of handlers (middlewares)
// and an array of handlers (middleware)
type RouterGroup struct {
Handlers HandlersChain
BasePath string
@@ -38,9 +38,9 @@ type RouterGroup struct {
root bool
}
// Adds middlewares to the group, see example code in github.
func (group *RouterGroup) Use(middlewares ...HandlerFunc) routesInterface {
group.Handlers = append(group.Handlers, middlewares...)
// Adds middleware to the group, see example code in github.
func (group *RouterGroup) Use(middleware ...HandlerFunc) routesInterface {
group.Handlers = append(group.Handlers, middleware...)
return group.returnObj()
}
@@ -54,8 +54,8 @@ func (group *RouterGroup) Group(relativePath string, handlers ...HandlerFunc) *R
}
}
// Handle registers a new request handle and middlewares with the given path and method.
// The last handler should be the real handler, the other ones should be middlewares that can and should be shared among different routes.
// Handle registers a new request handle and middleware with the given path and method.
// The last handler should be the real handler, the other ones should be middleware that can and should be shared among different routes.
// See the example code in github.
//
// For GET, POST, PUT, PATCH and DELETE requests the respective shortcut