Closed jmattheis closed 2 months ago
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
}
For this converter interface
goverter will generate this code
This could be simplified to:
This is useful for the
default
feature. See https://github.com/jmattheis/goverter/pull/96#discussion_r1381973283 & #93Please :+1: this issue if you like this functionality. If you have a specific use-case in mind, feel free to comment it.