-
Notifications
You must be signed in to change notification settings - Fork 224
Description
Hi,
I'd like to be able to combine multiple containers together. Instead of having a single container assembled within the main function I'd like to have one for each package and them combine them in main().
Currently I have to export every constructor or provider function to have it accessible from where I want to build the container. That's not great. I'd like some of those constructors to be package-private.
I believe there is currently no way to achieve that in dig, but please correct me if I'm wrong!
I'm inspired by Guice's modules https://github.com/google/guice/wiki/GettingStarted. Guice's users were encouraged to have a single "module" (a similar construct to the container) for every package. Modules would we later assembled when creating the "injector".
Do you think such a feature would make sense for dig?