| Index: mojom/generators/go/translator/mojom_file.go
|
| diff --git a/mojom/generators/go/translator/mojom_file.go b/mojom/generators/go/translator/mojom_file.go
|
| index d4de4846e8db7d5d3b0ca07d76a9221f2b024b22..c352728df227e8889e3dbefd61af3201982f7e3a 100644
|
| --- a/mojom/generators/go/translator/mojom_file.go
|
| +++ b/mojom/generators/go/translator/mojom_file.go
|
| @@ -10,6 +10,7 @@ type TmplFile struct {
|
| PackageName string
|
| Imports []Import
|
| Structs []*StructTemplate
|
| + Unions []*UnionTemplate
|
| }
|
|
|
| type Import struct {
|
| @@ -69,6 +70,28 @@ type structVersion struct {
|
| Version uint32
|
| }
|
|
|
| +type UnionTemplate struct {
|
| + // Name is the name of the union in go code.
|
| + Name string
|
| +
|
| + // Fields contains the list of fields of the union.
|
| + Fields []UnionFieldTemplate
|
| +}
|
| +
|
| +type UnionFieldTemplate struct {
|
| + // Name is the name of the field in go.
|
| + Name string
|
| +
|
| + // Type is the go type of the field value.
|
| + Type string
|
| +
|
| + // Tag of the field.
|
| + Tag uint32
|
| +
|
| + // Union is the union containing this field.
|
| + Union *UnionTemplate
|
| +}
|
| +
|
| ////////////////////////////////////////////////////////////////////////////////
|
|
|
| // EncodingInfo describes the information necessary to encode a field.
|
|
|