-
Notifications
You must be signed in to change notification settings - Fork 290
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
Feature request: easy constructor wrapper for named/grouped values #715
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
fx.Annotated
makes it easy to produce named and grouped values. But on the consumer side things are less pretty.Let's say we have a constructor with many parameters and we want to make some of them named/grouped. Right now, the only option to address this is by creating a wrapper function taking an
fx.In
derived parameter resulting in a rather long winded and untidy boilerplate code with some one off struct types on top.It may be possible to come with a constructor wrapper accepting a hint of some sort in addition to the constructor; possibly as simple as a specially coded string:
The implied meaning being that third argument of
myCons
must come from a provider annotated with name "funnyName".
The text was updated successfully, but these errors were encountered: