mirror of
https://github.com/kataras/iris.git
synced 2025-12-18 02:17:05 +00:00
replace ioutil with io package and other minor improvements
This commit is contained in:
@@ -384,9 +384,11 @@ func (c *ControllerActivator) handleHTTPError(funcName string) *router.Route {
|
||||
//
|
||||
// Just like `Party#HandleMany`:, it returns the `[]*router.Routes`.
|
||||
// Usage:
|
||||
// func (*Controller) BeforeActivation(b mvc.BeforeActivation) {
|
||||
// b.HandleMany("GET", "/path /path1" /path2", "HandlePath")
|
||||
// }
|
||||
//
|
||||
// func (*Controller) BeforeActivation(b mvc.BeforeActivation) {
|
||||
// b.HandleMany("GET", "/path /path1" /path2", "HandlePath")
|
||||
// }
|
||||
//
|
||||
// HandleMany will override any routes of this "funcName".
|
||||
func (c *ControllerActivator) HandleMany(method, path, funcName string, middleware ...context.Handler) []*router.Route {
|
||||
return c.handleMany(method, path, funcName, true, middleware...)
|
||||
|
||||
@@ -86,7 +86,8 @@ func New(party router.Party) *Application {
|
||||
// this function simply calls the `New(party)` and its `.Configure(configurators...)`.
|
||||
//
|
||||
// A call of `mvc.New(app.Party("/path").Configure(buildMyMVC)` is equal to
|
||||
// `mvc.Configure(app.Party("/path"), buildMyMVC)`.
|
||||
//
|
||||
// `mvc.Configure(app.Party("/path"), buildMyMVC)`.
|
||||
//
|
||||
// Read more at `New() Application` and `Application#Configure` methods.
|
||||
func Configure(party router.Party, configurators ...func(*Application)) *Application {
|
||||
|
||||
@@ -10,13 +10,13 @@ import (
|
||||
// It requires a specific "version" constraint for a Controller,
|
||||
// e.g. ">1.0.0 <=2.0.0".
|
||||
//
|
||||
//
|
||||
// Usage:
|
||||
// m := mvc.New(dataRouter)
|
||||
// m.Handle(new(v1Controller), mvc.Version("1.0.0"), mvc.Deprecated(mvc.DeprecationOptions{}))
|
||||
// m.Handle(new(v2Controller), mvc.Version("2.3.0"))
|
||||
// m.Handle(new(v3Controller), mvc.Version(">=3.0.0 <4.0.0"))
|
||||
// m.Handle(new(noVersionController))
|
||||
//
|
||||
// m := mvc.New(dataRouter)
|
||||
// m.Handle(new(v1Controller), mvc.Version("1.0.0"), mvc.Deprecated(mvc.DeprecationOptions{}))
|
||||
// m.Handle(new(v2Controller), mvc.Version("2.3.0"))
|
||||
// m.Handle(new(v3Controller), mvc.Version(">=3.0.0 <4.0.0"))
|
||||
// m.Handle(new(noVersionController))
|
||||
//
|
||||
// See the `versioning` package's documentation for more information on
|
||||
// how the version is extracted from incoming requests.
|
||||
|
||||
Reference in New Issue
Block a user