mirror of
https://github.com/kataras/iris.git
synced 2025-12-18 18:37:05 +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:
@@ -42,7 +42,7 @@ func newApp() *iris.Application {
|
||||
visitApp := mvc.New(app.Party("/"))
|
||||
// bind the current *session.Session, which is required, to the `VisitController.Session`
|
||||
// and the time.Now() to the `VisitController.StartTime`.
|
||||
visitApp.AddDependencies(
|
||||
visitApp.Register(
|
||||
// if dependency is a function which accepts
|
||||
// a Context and returns a single value
|
||||
// then the result type of this function is resolved by the controller
|
||||
@@ -55,7 +55,7 @@ func newApp() *iris.Application {
|
||||
sess.Start,
|
||||
time.Now(),
|
||||
)
|
||||
visitApp.Register(new(VisitController))
|
||||
visitApp.Handle(new(VisitController))
|
||||
|
||||
return app
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user