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

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

Issue 1943643002: Go bindings: Change generated enum value constants to be typed as the enum type. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 8 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/enum.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 e9ea33f18b5320f3e1d741db6b72e9164635f89b..385989d0cc48c308fdc73f9d7c678720227922ef 100644
--- a/mojo/public/tools/bindings/generators/mojom_go_generator.py
+++ b/mojo/public/tools/bindings/generators/mojom_go_generator.py
@@ -370,7 +370,7 @@ class Generator(generator.Generator):
all_structs.append(self._GetResponseStructFromMethod(method))
if (len(all_structs) > 0 or len(self.module.interfaces) > 0
- or len(self.module.unions) > 0):
+ or len(self.module.unions) > 0 or len(self.module.enums) > 0):
imports['fmt'] = 'fmt'
imports['mojo/public/go/bindings'] = 'bindings'
if len(self.module.interfaces) > 0:
« no previous file with comments | « mojo/public/tools/bindings/generators/go_templates/enum.tmpl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698