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

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: rebased 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
« no previous file with comments | « mojo/public/tools/bindings/generators/go_templates/struct.tmpl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cb5a16e7f2a847be87d0cea2d6fd34dc6ccc54df..536c8ec1947d45959c5b40a6584e743016c47142 100644
--- a/mojo/public/tools/bindings/generators/mojom_go_generator.py
+++ b/mojo/public/tools/bindings/generators/mojom_go_generator.py
@@ -259,7 +259,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)
« no previous file with comments | « mojo/public/tools/bindings/generators/go_templates/struct.tmpl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698