mirror of https://github.com/knative/pkg.git
Sink two codegen passes below loop. (#2209)
I noticed doing some tinkering that these were running on every iteration, but the inputs don't change. This sinks the calls to below the loop, and reduces things to a single call for each.
This commit is contained in:
parent
2c8a7b6bd7
commit
bf176d5654
|
@ -78,12 +78,6 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat
|
|||
groupGoNames[groupPackageName] = namer.IC(override[0])
|
||||
}
|
||||
|
||||
// Generate the client and fake.
|
||||
packageList = append(packageList, versionClientsPackages(versionPackagePath, boilerplate, customArgs)...)
|
||||
|
||||
// Generate the informer factory and fake.
|
||||
packageList = append(packageList, versionFactoryPackages(versionPackagePath, boilerplate, customArgs)...)
|
||||
|
||||
var typesWithInformers []*types.Type
|
||||
var duckTypes []*types.Type
|
||||
var reconcilerTypes []*types.Type
|
||||
|
@ -135,6 +129,12 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat
|
|||
}
|
||||
}
|
||||
|
||||
// Generate the client and fake.
|
||||
packageList = append(packageList, versionClientsPackages(versionPackagePath, boilerplate, customArgs)...)
|
||||
|
||||
// Generate the informer factory and fake.
|
||||
packageList = append(packageList, versionFactoryPackages(versionPackagePath, boilerplate, customArgs)...)
|
||||
|
||||
return packageList
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue