Allow dig.As with dig.Group
Terminator637 opened this issue · 2 comments
Terminator637 commented
Hello there!
Why I can't use dig.As with dig.Group provide option?
It would be better if I can write:
d.Provide(NewCleanService, dig.Group("cron_job"), dig.As(new(cron.Command)))
instead of:
d.Provide(NewCleanService)
d.Provide(func(service *CleanService) cron.Command { return service }, dig.Group("cron_job")))
sywhang commented
This is a valid feature request. We'll have someone take a look when they're able, but feel free to contribute a PR.
Terminator637 commented
Thank you! You are the best!