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

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

Issue 1345263002: Generate Mojom Types in Go (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Use unexported functions instead of variables 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/mojom_util_macros.tmpl
diff --git a/mojo/public/tools/bindings/generators/go_templates/mojom_util_macros.tmpl b/mojo/public/tools/bindings/generators/go_templates/mojom_util_macros.tmpl
new file mode 100644
index 0000000000000000000000000000000000000000..b0bedd246d1ea9da079c829f5ca7a7a1d5076c67
--- /dev/null
+++ b/mojo/public/tools/bindings/generators/go_templates/mojom_util_macros.tmpl
@@ -0,0 +1,11 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+{%- macro typeName(t, typepkg, pkg) -%}
azani 2015/10/12 21:13:07 Create a function in mojom_go_generator and pass i
alexfandrianto 2015/10/16 21:25:49 This used to be more complex in previous iteration
+{%- if t|is_enum or t|is_struct or t|is_union or t|is_interface -%}
+{{t|identifier(pkg)}}__
+{%- else -%}
+BAD TYPE NAME GIVEN
+{%- endif -%}
+{%- endmacro -%}

Powered by Google App Engine
This is Rietveld 408576698