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 unexpected elements #14

Closed

Conversation

cbrow111
Copy link

  • Add flag option to enable unexpected element support
  • Add flag argument to allow custom unexpected element container name; this allows for proactive prevention of name collisions
  • Update to go 1.21
  • Add .gitignore

Copy link
Owner

@twpayne twpayne left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. Please see the individual comments.

.gitignore Outdated Show resolved Hide resolved
generator.go Outdated
initializeUnexpectedElements(g.unexpectedElementTypeName)
options.importPackageNames["encoding/xml"] = struct{}{}
options.namedTypes = make(map[xml.Name]*element)
options.namedTypes[xml.Name{Local: g.unexpectedElementTypeName}] = unexpectedElement
Copy link
Owner

Choose a reason for hiding this comment

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

options.namedTypes is overwritten at at line 231 if g.namedTypes is true.

go.mod Outdated Show resolved Hide resolved
- Remove unnecessary references to options.namedTypes
- Remove unneeded entry in .gitignore
@twpayne
Copy link
Owner

twpayne commented Apr 3, 2024

Closing due to inactivity.

@twpayne twpayne closed this Apr 3, 2024
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