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

Unified Diff: mojo/public/tools/bindings/generators/mojom_go_generator.py

Issue 948343008: go/bindings: update code to pass structs versions tests (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: a small fix 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: mojo/public/tools/bindings/generators/mojom_go_generator.py
diff --git a/mojo/public/tools/bindings/generators/mojom_go_generator.py b/mojo/public/tools/bindings/generators/mojom_go_generator.py
index 7e42d53c0686ad63cc94d8e567ab9487cd85860f..69e544f7684e60bc8d74d2b65867d967f857ab15 100644
--- a/mojo/public/tools/bindings/generators/mojom_go_generator.py
+++ b/mojo/public/tools/bindings/generators/mojom_go_generator.py
@@ -253,7 +253,11 @@ def GetImports(module):
all_structs.append(GetResponseStructFromMethod(method))
if len(all_structs) > 0 or len(module.interfaces) > 0:
+ _imports['fmt'] = 'fmt'
_imports['mojo/public/go/bindings'] = 'bindings'
+ if len(all_structs) > 0:
+ _imports['sort'] = 'sort'
+
for struct in all_structs:
for field in struct.fields:
AddImport(module, field.kind)

Powered by Google App Engine
This is Rietveld 408576698