| 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..8fced7fce6148d362f8ee15cbfbc48a43deac8c7 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,31 @@ 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 contains the information necessary to encode and decode the field.
|
| + EncodingInfo EncodingInfo
|
| +}
|
| +
|
| ////////////////////////////////////////////////////////////////////////////////
|
|
|
| // EncodingInfo describes the information necessary to encode a field.
|
|
|