Closed kliko9 closed 1 year ago
I agree, it should be possible to set these options globally.
When you run goverter, you can pass -ignoreUnexportedFields
, to automatically ignore all unexported fields. I feel like globally ignoring exported fields should be a rare use-case, and can possibly lead to unwanted behavior, thus, I'll close this issue.
Let's consider example based on code generated by grpc that adds 3 additional fields state, sizeCache and unknownFields to every generated structure. In case when I've defined interface that will translate multiple structures I have to repeat myself on every structure to ignore those fields and additionally matchIgnoreCase. It would be cool to be able to define ignore and matchIgnoreCase at the level of interface so that every method has them in common defined.
Instead of:
do this: