Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mask certain keys #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Mask certain keys #26

wants to merge 1 commit into from

Conversation

kellerza
Copy link

This masks certain struct keys.

The use case was to print a yang.Entry from https://github.com/openconfig/goyang

Each yang.Entry / yang.Node etc can have a parent which seems to recursively cause repr.Print to go into a loop
This now works with

repr.Println(e, repr.MaskKey("Parent"))

Open to change the name MaskKeys / HideKeys etc.
Could also use ... as you currently use in the seen logic

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.

1 participant