Is your feature request related to a problem? Please describe.
when wiring multiple same types, currently I'm forced to create a new type from slice type and write a Provider function manually, like this
type Handlers []types.Handlers
func HandlersProvider() Handlers {
return []types.Handlers {
handler.NewHandlerA,
handler.NewHandlerB,
...
}
Describe the solution you'd like
wire.Slice(
T,
providers...
)
for example, like this
// this provides multiple T into single T, also this can be defined multiple times, everything will be joined to single type
wire.Slice(
[]types.EventHandler,
handler.NewHandlerA,
handler.NewHandlerB,
handler.NewHandlerC,
... // keep going
)
Describe alternatives you've considered
Additional context
I implemented Proof of Concept in my forked branch. see below:
https://github.com/zzzz465/wire/tree/feat/wire-slice
Is your feature request related to a problem? Please describe.
when wiring multiple same types, currently I'm forced to create a new type from slice type and write a Provider function manually, like this
Describe the solution you'd like
for example, like this
Describe alternatives you've considered
Additional context
I implemented Proof of Concept in my forked branch. see below:
https://github.com/zzzz465/wire/tree/feat/wire-slice