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

feat(tree): modify children of existing Tree #461

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

bashbunni
Copy link
Member

This allows users to modify existing Trees. In the current version of this table, there is no way to change existing children outside of adding a new child with Tree.Child().

This also handles operations on Leaf types to turn them into Trees.

See examples for usage on these changes. Those examples are testable, so see their output in comment to see how these API changes work.

@bashbunni bashbunni added the enhancement New feature or request label Jan 10, 2025
This was referenced Jan 10, 2025
}
case Node:
nodes = append(nodes, item)
case fmt.Stringer:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be useful to support encoding.TextMarshaler as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants