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

Add support for: WithMaxDepth, WithAppendSlice, WithKeyStringer #5

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

Conversation

shivamMg
Copy link

No description provided.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@shivamMg shivamMg closed this Jun 18, 2019
@shivamMg shivamMg reopened this Jun 18, 2019
@peterbourgon
Copy link
Owner

Can you say a bit more why you want these changes? AppendSlice makes sense, but why the others?

@shivamMg
Copy link
Author

I was trying to use the library with maps returned from YAML unmarshal. Most use cases arose from there.

  • WithMaxDepth: Needed control over depth of nested key-value maps in YAML
  • WithKeyStringer: In case of a nil map key, reflect would return "nil" string. My use case required it to be "null". Example.

I do understand that these might not be super-relevant for the library. Feel free to ignore the PR.

@peterbourgon
Copy link
Owner

Yeah, I'll probably add the MaxDepth option, and might add the AppendSlice option, but I think the KeyStringer bit is out of scope.

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.

None yet

2 participants