Closed h1z3y3 closed 11 months ago
goverter:ignore
doesn't support nesting. You could define goverter:ignoreUnexported
on the converter interface or define conversion method for the MetaData subtype and goverter:ignore the fields there too.
// goverter:converter
type Converter interface {
// goverter:ignore state sizeCache
Convert(source Input) Output
// goverter:ignore state sizeCache
Converter(v struct{Name string; Age int}) MetaData
}
type Input struct {
MetaData struct {
Name string
Age int
}
}
type Output struct {
state int
sizeCache int
MetaData MetaData
}
type MetaData struct {
state int
sizeCache int
Name string
Age int
}
Have you read the project readme?
Describe your question A clear and concise description of what the question is. Include errors and go source files.
My source:
My target:
But
// goverter:ignore state sizeCache MetaData.state MetaData.sizeCache
only works for.state
and.sizeCache
Error Message:
// goverter:ignoreUnexported
also didn't work for me ;