jmattheis / goverter

Generate type-safe Go converters by simply defining an interface
https://goverter.jmattheis.de/
MIT License
496 stars 46 forks source link

Global option for ignoring unexported fields #31

Closed ewhauser closed 1 year ago

ewhauser commented 1 year ago

Is your feature request related to a problem? Please describe.

I'm using with Protocol Buffers which have 4 unexported fields. I can ignore these via:

    // goverter:ignore size
    // goverter:ignore sizeCache
    // goverter:ignore state
    // goverter:ignore unknownFields

on each conversion method but it is tedious and duplicative.

Describe the solution you'd like A global option for ignoring this on all objects would be great or an option on each method.

Describe alternatives you've considered Currently, just ignoring on each method.