8000
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
Goverter could use the addition of generic type aliases (go1.24), to declare arguments as context or update argument. E.g. the following converter
// goverter:converter type Converter interface { // goverter:update target ConvertUpdate(source Input, target *Output) error // goverter:context dateFormat ConvertContext(source map[string]Input, dateFormat string) map[string]Output }
could be written as
import "github.com/goverter/arg" // goverter:converter type Converter interface { ConvertUpdate(source Input, target arg.Target[*Output]) error ConvertContext(source map[string]Input, dateFormat arg.Context[string]) map[string]Output }
where github.com/goverter/arg would contain something like:
github.com/goverter/arg
type Context[T any] = T type Target[T any] = T
Please 👍 this issue if you like this functionality. If you have a specific use-case in mind, feel free to comment it.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Goverter could use the addition of generic type aliases (go1.24), to declare arguments as context or update argument. E.g. the following converter
could be written as
where
github.com/goverter/arg
would contain something like:Please 👍 this issue if you like this functionality. If you have a specific use-case in mind, feel free to comment it.
The text was updated successfully, but these errors were encountered: