Can fx.Private
be scoped as a top-level fx.Option
instead of a var
#1020
Labels
fx.Private
be scoped as a top-level fx.Option
instead of a var
#1020
Is your feature request related to a problem? Please describe.
I'd like to be able to continue the scoping story started with
fx.Private
but make it a top-levelfx.Option
that can be applied outside offx.Provide
.The usual pattern is for
fx.Provide
to already be set in legacy codebases; I would prefer not to go back and change old code by adding anfx.private
into it. Instead I feel it may be easier and safer to create a newfx.Module
around this to "privatize" the legacy module.Describe the solution you'd like
Suppose we have legacy code that looks like this that we wish not to touch
in my main method I'd like to be able to do something like this to have two etcd's (perhaps a global and a regional)
Describe alternatives you've considered
None
Is this a breaking change?
No
Additional context
None
The text was updated successfully, but these errors were encountered: