Skip to content

Commit a0760a0

Browse files
committed
Adds xml tags for generated types
1 parent 0f9b0b2 commit a0760a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

generator/types_tmpl.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ var typesTmpl = `
4949
5050
{{define "Elements"}}
5151
{{range .}}
52-
{{replaceReservedWords .Name}} {{if eq .MaxOccurs "unbounded"}}[]{{end}}{{.Type | toGoType}}{{end}}
52+
{{replaceReservedWords .Name}} {{if eq .MaxOccurs "unbounded"}}[]{{end}}{{.Type | toGoType}} ` + "`" + `xml:"{{.Name}},omitempty"` + "`" + `{{end}}
5353
{{end}}
5454
5555
{{range .Schemas}}

0 commit comments

Comments
 (0)