-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
Improve struct code-generation for pointer fields #97
Labels
feature
New feature or request
Comments
This could be simplified more: func (c *ConverterImpl) Convert(source *example.Input) *example.Output {
var pExampleOutput *example.Output
if source != nil {
pExampleOutput = & example.Output{
Age: source.Age,
Name: source.Name,
}
}
return pExampleOutput
} |
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For this converter interface
goverter will generate this code
This could be simplified to:
This is useful for the
default
feature. See #96 (comment) & #93Please 👍 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: