Skip to content

Ability to suppress fields from display - #120

Open
klaxxon wants to merge 7 commits into
davecgh:masterfrom
klaxxon:master
Open

Ability to suppress fields from display#120
klaxxon wants to merge 7 commits into
davecgh:masterfrom
klaxxon:master

Conversation

@klaxxon

@klaxxon klaxxon commented Feb 3, 2020

Copy link
Copy Markdown

This is my first pull request. Just the config file is what I am asking for you to consider.

Using your package and my structs contain a lot of management/housekeeping sub-structs which clutter up the output. I needed a way to say "don't show any 'config' structs" or of the type "TempData".

Creates and maintains a map of strings for field names and types. Two methods to add the name or type to these maps and continue statements in your recursive output builder to skip these fields if they are found.

Thank You!

@ptrcnull

ptrcnull commented Nov 2, 2021

Copy link
Copy Markdown

IMHO it would be simpler to just export the field in config struct and get rid of the IgnoreFieldBy(...) methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants