| Index: mojom/generators/go/templates/templates.go
|
| diff --git a/mojom/generators/go/templates/templates.go b/mojom/generators/go/templates/templates.go
|
| index fd725af0d305aec6ebf1b66bb08b48c4756a5b1a..3de97ec1b54bff07ea274ee42a77f65b20569941 100644
|
| --- a/mojom/generators/go/templates/templates.go
|
| +++ b/mojom/generators/go/templates/templates.go
|
| @@ -34,6 +34,7 @@ func ExecuteTemplates(tmplFile *translator.TmplFile) string {
|
| func init() {
|
| // We parse the subtemplates only once.
|
| goFileTmpl = template.New("GoFileTemplate")
|
| +
|
| template.Must(goFileTmpl.Parse(goFileTemplate))
|
| template.Must(goFileTmpl.Parse(nonNullableFieldDecodingTmplText))
|
| template.Must(goFileTmpl.Parse(fieldDecodingTmplText))
|
| @@ -44,6 +45,11 @@ func init() {
|
| template.Must(goFileTmpl.Parse(structDeclTmplText))
|
| template.Must(goFileTmpl.Parse(structVersions))
|
| template.Must(goFileTmpl.Parse(structDecodingTmplText))
|
| +
|
| + template.Must(goFileTmpl.Parse(unionDeclTmplText))
|
| + template.Must(goFileTmpl.Parse(unionInterfaceDeclTmplText))
|
| + template.Must(goFileTmpl.Parse(unionFieldDeclTmplText))
|
| + template.Must(goFileTmpl.Parse(unknownUnionFieldDeclTmplText))
|
| }
|
|
|
| const goFileTemplate = `
|
|
|