Index: mojo/public/tools/bindings/generators/go_templates/enum.tmpl |
diff --git a/mojo/public/tools/bindings/generators/go_templates/enum.tmpl b/mojo/public/tools/bindings/generators/go_templates/enum.tmpl |
index 8bc882fd2fc18bcf8be624c0dfaf95ddac248c6c..2e47288618266b882dd5e38a8adf7439172f0e2d 100644 |
--- a/mojo/public/tools/bindings/generators/go_templates/enum.tmpl |
+++ b/mojo/public/tools/bindings/generators/go_templates/enum.tmpl |
@@ -2,7 +2,10 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-{% macro define(enum) %} |
+{% import "mojom_type_macros.tmpl" as mojom_type_macros %} |
+{% import "mojom_util_macros.tmpl" as util %} |
+ |
+{% macro define(enum, typepkg, package) %} |
type {{enum|name}} int32 |
const ( |
@@ -17,4 +20,7 @@ const ( |
{% endfor %} |
) |
+var {{util.enumName(enum, typepkg, package)}} = {{ |
+ mojom_type_macros.writeMojomType(typepkg, enum, package, exported) }} |
+ |
{% endmacro %} |