Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(268)

Unified Diff: mojo/public/tools/bindings/generators/go_templates/enum.tmpl

Issue 1345263002: Generate Mojom Types in Go (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Address Naming changes and Comment Updates Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..47047579c98a63722ca2cb7a888ed4f16add42ff 100644
--- a/mojo/public/tools/bindings/generators/go_templates/enum.tmpl
+++ b/mojo/public/tools/bindings/generators/go_templates/enum.tmpl
@@ -2,7 +2,9 @@
// 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 %}
+
+{% macro define(enum, typepkg, package) %}
type {{enum|name}} int32
const (
@@ -17,4 +19,6 @@ const (
{% endfor %}
)
+{{ mojom_type_macros.writeMojomTypeDef(typepkg, enum, package, exported) }}
+
{% endmacro %}
« no previous file with comments | « mojo/public/go/application/describer.go ('k') | mojo/public/tools/bindings/generators/go_templates/interface.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698