1
0
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:
Gerasimos (Makis) Maropoulos
2020-04-17 15:56:36 +03:00
parent eafa63da50
commit 1bb76853a9
12 changed files with 108 additions and 65 deletions

View File

@@ -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 */