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

Side by Side Diff: mojom/generators/common/cli.go

Issue 1930603004: mojom: move mojom/mojom_tool/generated -> mojom/generated. Update consumers (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fix paths to new `generated/` in mojom_tool/BUILD.gn Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « mojom/generated/mojom_types/mojom_types.mojom.go ('k') | mojom/generators/common/common.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // cli.go implements logic to create a generator config object from command 5 // cli.go implements logic to create a generator config object from command
6 // line arguments. 6 // line arguments.
7 7
8 package common 8 package common
9 9
10 import ( 10 import (
11 "flag" 11 "flag"
12 "io" 12 "io"
13 "io/ioutil" 13 "io/ioutil"
14 "log" 14 "log"
15 "os" 15 "os"
16 "path/filepath" 16 "path/filepath"
17 17
18 "mojo/public/go/bindings" 18 "mojo/public/go/bindings"
19 » "mojom/mojom_tool/generated/mojom_files" 19 » "mojom/generated/mojom_files"
20 ) 20 )
21 21
22 // GetConfig provides the primary interface for generators. 22 // GetConfig provides the primary interface for generators.
23 // By calling GetConfig, a generator implements the command line interface 23 // By calling GetConfig, a generator implements the command line interface
24 // that is used by all generators. 24 // that is used by all generators.
25 func GetCliConfig(args []string) GeneratorConfig { 25 func GetCliConfig(args []string) GeneratorConfig {
26 config := new(generatorCliConfig) 26 config := new(generatorCliConfig)
27 flagSet := flag.NewFlagSet("Generator Common Flag Set", flag.ExitOnError ) 27 flagSet := flag.NewFlagSet("Generator Common Flag Set", flag.ExitOnError )
28 28
29 var fileGraphFile string 29 var fileGraphFile string
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 // See GeneratorConfig. 103 // See GeneratorConfig.
104 func (c *generatorCliConfig) SrcRootPath() string { 104 func (c *generatorCliConfig) SrcRootPath() string {
105 return c.srcRootPath 105 return c.srcRootPath
106 } 106 }
107 107
108 // See GeneratorConfig. 108 // See GeneratorConfig.
109 func (c *generatorCliConfig) GenImports() bool { 109 func (c *generatorCliConfig) GenImports() bool {
110 return !c.noGenImports 110 return !c.noGenImports
111 } 111 }
OLDNEW
« no previous file with comments | « mojom/generated/mojom_types/mojom_types.mojom.go ('k') | mojom/generators/common/common.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698