We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
fx.Annotate allows passing a function that takes a variadic number of arguments, and feeding them from a value group:
func NewFoo(...FooOption) *Foo fx.Annotate( NewFoo, fx.ParamTags(`group:"option"`), )
However, there's a bug: if you do not use the value group, the parameter is a required []FooOption.
For example,
func NewFoo(...FooOption) *Foo fx.Annotate( NewFoo, fx.As(new(Fooer)), )
In this, the FooOptions should be optional as it is in fx outside of Annotate.
Whenever no tags are specified for a variadic parameter, it should be optional by default.
The text was updated successfully, but these errors were encountered:
josephinedotlee
Successfully merging a pull request may close this issue.
fx.Annotate allows passing a function that takes a variadic number of
arguments, and feeding them from a value group:
However, there's a bug: if you do not use the value group,
the parameter is a required []FooOption.
For example,
In this, the FooOptions should be optional as it is in fx outside of Annotate.
Whenever no tags are specified for a variadic parameter, it should be optional by default.
The text was updated successfully, but these errors were encountered: