Chromium Code Reviews| Index: mojom/generators/common/cli.go |
| diff --git a/mojom/generators/common/cli.go b/mojom/generators/common/cli.go |
| index 1599f7407a37d8b4605ae3e13438fc076a4d9232..ce33738f506e37150e68be6af93e6308c315c494 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 GetCustomCliConfig(args, flagSet) |
| +} |
| + |
| +func GetCustomCliConfig(args []string, flagSet *flag.FlagSet) GeneratorConfig { |
|
vardhan
2016/06/24 01:36:07
suggestion: maybe GetCliConfigWithFlagSet?
azani
2016/06/24 19:21:21
Done.
|
| + config := new(generatorCliConfig) |
| var fileGraphFile string |
| flagSet.StringVar(&fileGraphFile, "file-graph", "-", |