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

Unified Diff: mojom/generators/common/cli.go

Issue 2091493002: Switch to the new go generator in the mojo tree. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Update names as suggested. Created 4 years, 6 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/run_code_generators.py ('k') | mojom/generators/go/go_generator.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojom/generators/common/cli.go
diff --git a/mojom/generators/common/cli.go b/mojom/generators/common/cli.go
index 1599f7407a37d8b4605ae3e13438fc076a4d9232..3e518ee138020ba5e80ac7461ce2c29087409bfc 100644
--- a/mojom/generators/common/cli.go
+++ b/mojom/generators/common/cli.go
@@ -19,12 +19,16 @@ import (
"mojom/generated/mojom_files"
)
-// GetConfig provides the primary interface for generators.
-// By calling GetConfig, a generator implements the command line interface
+// GetCliConfig provides the primary interface for generators.
+// By calling GetCliConfig, a generator implements the command line interface
// that is used by all generators.
func GetCliConfig(args []string) GeneratorConfig {
- config := new(generatorCliConfig)
flagSet := flag.NewFlagSet("Generator Common Flag Set", flag.ExitOnError)
+ return GetCliConfigWithFlagSet(args, flagSet)
+}
+
+func GetCliConfigWithFlagSet(args []string, flagSet *flag.FlagSet) GeneratorConfig {
+ config := new(generatorCliConfig)
var fileGraphFile string
flagSet.StringVar(&fileGraphFile, "file-graph", "-",
« no previous file with comments | « mojo/public/tools/bindings/run_code_generators.py ('k') | mojom/generators/go/go_generator.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698