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

Unified Diff: third_party/mojo/src/mojo/public/tools/bindings/generators/go_templates/source.tmpl

Issue 910883002: Update mojo sdk to rev 8af2ccff2eee4bfca1043015abee30482a030b30 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Apply 9f87aeadbda22441b7d469e596f7bd7d0d73e2a8 (https://codereview.chromium.org/908973002/) Created 5 years, 10 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: third_party/mojo/src/mojo/public/tools/bindings/generators/go_templates/source.tmpl
diff --git a/third_party/mojo/src/mojo/public/tools/bindings/generators/go_templates/source.tmpl b/third_party/mojo/src/mojo/public/tools/bindings/generators/go_templates/source.tmpl
index 8c58c4cf355892df70f861d18cecf9521174b0cd..3769585193e74b681877d8623ab36007ee3b87e0 100644
--- a/third_party/mojo/src/mojo/public/tools/bindings/generators/go_templates/source.tmpl
+++ b/third_party/mojo/src/mojo/public/tools/bindings/generators/go_templates/source.tmpl
@@ -9,3 +9,33 @@
//
package {{package}}
+
+import (
+ "fmt"
+
+ "mojo/public/go/bindings"
+ "mojo/public/go/system"
+)
+
+var _ = fmt.Errorf
+var _ = bindings.NewEncoder
+var _ = system.GetCore
+
+{% import "enum.tmpl" as enum_macros %}
+{% import "interface.tmpl" as interface_macros %}
+{% import "struct.tmpl" as struct_macros %}
+
+{#- Enum definitions #}
+{% for enum in enums %}
+{{enum_macros.define(enum)}}
+{%- endfor %}
+
+{#- Interface definitions #}
+{% for interface in interfaces %}
+{{interface_macros.define(interface)}}
+{%- endfor %}
+
+{#- Struct definitions #}
+{% for struct in structs %}
+{{struct_macros.define(struct)}}
+{%- endfor %}

Powered by Google App Engine
This is Rietveld 408576698