1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 10:27:06 +00:00

dependency injection: func (...<T>) iris.Handler can be generated to a simple iris handler if <T> are static dependencies

This commit is contained in:
Gerasimos (Makis) Maropoulos
2021-06-10 21:16:00 +03:00
parent 8f9140b705
commit 96c2dec47f
6 changed files with 58 additions and 7 deletions

View File

@@ -933,7 +933,7 @@ type (
// }
// Usage with (static) dependencies:
// app.RegisterDependency(userRepo, ...)
// app.PartyConfigure("/users", &api.UsersAPI{})
// app.PartyConfigure("/users", new(api.UsersAPI))
func (api *APIBuilder) PartyConfigure(relativePath string, partyReg ...PartyConfigurator) Party {
var child Party