Skip to content

Commit

Permalink
Merge pull request hooklift#60 from mitch000001/always_export_fields
Browse files Browse the repository at this point in the history
Always export fields of structs
  • Loading branch information
c4milo authored Sep 6, 2016
2 parents e894ebf + 0f04795 commit 3abbbe4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions gowsdl.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ func (g *GoWSDL) genTypes() ([]byte, error) {
"stripns": stripns,
"replaceReservedWords": replaceReservedWords,
"makePublic": g.makePublicFn,
"makeFieldPublic": makePublic,
"comment": comment,
"removeNS": removeNS,
}
Expand Down
6 changes: 3 additions & 3 deletions types_tmpl.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ var typesTmpl = `
{{define "Attributes"}}
{{range .}}
{{if .Doc}} {{.Doc | comment}} {{end}} {{if not .Type}}
{{ .Name | makePublic}} {{toGoType .SimpleType.Restriction.Base}} ` + "`" + `xml:"{{.Name}},attr,omitempty"` + "`" + `
{{ .Name | makeFieldPublic}} {{toGoType .SimpleType.Restriction.Base}} ` + "`" + `xml:"{{.Name}},attr,omitempty"` + "`" + `
{{else}}
{{ .Name | makePublic}} {{toGoType .Type}} ` + "`" + `xml:"{{.Name}},attr,omitempty"` + "`" + `
{{ .Name | makeFieldPublic}} {{toGoType .Type}} ` + "`" + `xml:"{{.Name}},attr,omitempty"` + "`" + `
{{end}}
{{end}}
{{end}}
Expand Down Expand Up @@ -70,7 +70,7 @@ var typesTmpl = `
{{if .Doc}}
{{.Doc | comment}} {{"\n"}}
{{end}}
{{replaceReservedWords .Name | makePublic}} {{if eq .MaxOccurs "unbounded"}}[]{{end}}{{.Type | toGoType}} ` + "`" + `xml:"{{.Name}},omitempty"` + "`" + ` {{end}}
{{replaceReservedWords .Name | makeFieldPublic}} {{if eq .MaxOccurs "unbounded"}}[]{{end}}{{.Type | toGoType}} ` + "`" + `xml:"{{.Name}},omitempty"` + "`" + ` {{end}}
{{end}}
{{end}}
{{end}}
Expand Down

0 comments on commit 3abbbe4

Please sign in to comment.