k0kubun/pp

Add option to skip unexported fields

hhhapz opened this issue · 3 comments

Sometimes, when printing datastructures that you don't have access to, it's not possible to modify the struct tags. In these situations, sometimes it is nice to be able to ignore unexported fields. Perhaps a flag on the printer, or a global variable (for the default printer) could work?

Add option to skip unexported fields

sometimes it is nice to be able to ignore exported fields

Sorry, which one do you want?

Sorry! I meant to be able to ignore unexported fields, consistent with my issue title.

Could you try #60? reflect's IsExported() is not available for some Go versions that pp supports, so I'm not sure if my implementation is right.