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

Generate camelCase from snake-case XML tags #29

Open
ranganath42 opened this issue Nov 23, 2020 · 0 comments
Open

Generate camelCase from snake-case XML tags #29

ranganath42 opened this issue Nov 23, 2020 · 0 comments

Comments

@ranganath42
Copy link

How about adding an option to generate camelCase Go structs from snake-case XML structs?
For example, from

<Address>
    <zip-code/>
    <city/>
</Address>

To generate,

type Address struct {
        XMLName xml.Name `xml:"Address,omitempty" json:"Address,omitempty"`
        City *City `xml:"city,omitempty" json:"city,omitempty"`
        ZipCode *ZipCode `xml:"zip-code,omitempty" json:"zip-code,omitempty"`
}

type City struct {
        XMLName xml.Name `xml:"city,omitempty" json:"city,omitempty"`
}

type ZipCode struct {
        XMLName xml.Name `xml:"zip-code,omitempty" json:"zip-code,omitempty"`
}
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

No branches or pull requests

1 participant