mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-08 03:33:56 +00:00
Renamed gengo Builder -> Parser
This commit is contained in:
parent
cb86010d20
commit
96b91f364a
@ -86,7 +86,7 @@ func (g *Generator) BindFlags(flag *flag.FlagSet) {
|
|||||||
func Run(g *Generator) {
|
func Run(g *Generator) {
|
||||||
// Roughly models gengo/v2.newBuilder.
|
// Roughly models gengo/v2.newBuilder.
|
||||||
|
|
||||||
b := parser.NewWithOptions(parser.Options{BuildTags: []string{"proto"}})
|
p := parser.NewWithOptions(parser.Options{BuildTags: []string{"proto"}})
|
||||||
|
|
||||||
var allInputs []string
|
var allInputs []string
|
||||||
if len(g.APIMachineryPackages) != 0 {
|
if len(g.APIMachineryPackages) != 0 {
|
||||||
@ -133,12 +133,12 @@ func Run(g *Generator) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Load all the packages at once.
|
// Load all the packages at once.
|
||||||
if err := b.LoadPackages(packages...); err != nil {
|
if err := p.LoadPackages(packages...); err != nil {
|
||||||
log.Fatalf("Unable to load packages: %v", err)
|
log.Fatalf("Unable to load packages: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
c, err := generator.NewContext(
|
c, err := generator.NewContext(
|
||||||
b,
|
p,
|
||||||
namer.NameSystems{
|
namer.NameSystems{
|
||||||
"public": namer.NewPublicNamer(3),
|
"public": namer.NewPublicNamer(3),
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user