| Index: third_party/mojo/src/mojo/public/tools/bindings/generators/go_templates/struct.tmpl
|
| diff --git a/third_party/mojo/src/mojo/public/tools/bindings/generators/go_templates/struct.tmpl b/third_party/mojo/src/mojo/public/tools/bindings/generators/go_templates/struct.tmpl
|
| index f523ba6b8589ec3fab2a76801e28e4f3fd48f2f0..fe9eb34963017f03d4adff5ade09d1f42c585001 100644
|
| --- a/third_party/mojo/src/mojo/public/tools/bindings/generators/go_templates/struct.tmpl
|
| +++ b/third_party/mojo/src/mojo/public/tools/bindings/generators/go_templates/struct.tmpl
|
| @@ -91,7 +91,7 @@ if err := encoder.WritePointer(); err != nil {
|
| return err
|
| }
|
| {% endif %}
|
| -{% if kind|is_struct %}
|
| +{% if kind|is_struct or kind|is_union %}
|
| if err := {{value}}.Encode(encoder); err != nil {
|
| return err
|
| }
|
| @@ -195,7 +195,7 @@ if err != nil {
|
|
|
|
|
| {% macro decodePointerValue(value, kind, level=0) %}
|
| -{% if kind|is_struct %}
|
| +{% if kind|is_struct or kind|is_union %}
|
| if err := {{value}}.Decode(decoder); err != nil {
|
| return err
|
| }
|
|
|