1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-09 13:05:56 +00:00

Replace controller's .Register with .Handle and AddDependencies with .Register in order to be aligned with the 'hero' package, all examples and docs are updated, it's crazy how I can't stop even on Christmas

Former-commit-id: 3b42963e9806e327ee42942cf156bda6059eaf8f
This commit is contained in:
Gerasimos (Makis) Maropoulos
2017-12-27 04:15:41 +02:00
parent 8fd4dc2b4b
commit b282e7c563
25 changed files with 110 additions and 119 deletions

View File

@@ -31,18 +31,18 @@ func (app *Application) Controller(relPath string, c interface{}, _ ...interface
// ...
)
// or use it like this: ).AddDependencies(...).Register(new(%s))
// or use it like this: ).Register(...).Handle(new(%s))
mvc.Configure(app.Party("%s"), myMVC)
func myMVC(mvcApp *mvc.Application) {
mvcApp.AddDependencies(
mvcApp.Register(
Struct_Values_Dependencies_Binded_To_The_Fields_Or_And_To_Methods,
Or_And_Func_Values_Dependencies_Binded_To_The_Fields_Or_And_To_Methods,
)
mvcApp.Router.Use(Any_Middleware)
mvcApp.Register(new(%s))
mvcApp.Handle(new(%s))
}
The new MVC implementation contains a lot more than the above,