mirror of
https://github.com/kataras/iris.git
synced 2025-12-17 18:07:01 +00:00
.DI() to ConfigureContainer(...builders)
Former-commit-id: 169671a8b5b706dc8f136e68c1a060f27a2c421b
This commit is contained in:
@@ -46,11 +46,10 @@ func newApp() *iris.Application {
|
||||
// a JSON and 200 status code
|
||||
// or 202 status code and empty body
|
||||
// or a 409 status code and "my_error" body.
|
||||
di := app.DI()
|
||||
{
|
||||
di.Use(middleware)
|
||||
di.Post("/{id:int}", handler)
|
||||
}
|
||||
app.ConfigureContainer(func(api *iris.APIContainer) {
|
||||
api.Use(middleware)
|
||||
api.Post("/{id:int}", handler)
|
||||
})
|
||||
|
||||
app.Configure(
|
||||
iris.WithOptimizations, /* optional */
|
||||
|
||||
Reference in New Issue
Block a user