New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can fx.Private
be scoped as a top-level fx.Option
instead of a var
#1020
Labels
Comments
How about
|
Yes that would work. |
One issue here is the naming collision since there is already
Perhaps this can be named as
|
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: