Skip to content

Commit 84ada40

Browse files
committed
use consistent OutputPackage var name
On-behalf-of: @SAP [email protected]
1 parent 2f0cd19 commit 84ada40

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

cmd/cluster-lister-gen/args/args.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ import (
2424

2525
// Args is used by the gengo framework to pass args specific to this generator.
2626
type Args struct {
27-
OutputDir string // must be a directory path
28-
OutputPkg string // must be a Go import-path
29-
GoHeaderFile string
27+
OutputDir string // must be a directory path
28+
OutputPackage string // must be a Go import-path
29+
GoHeaderFile string
3030

3131
// PluralExceptions specify list of exceptions used when pluralizing certain types.
3232
// For example 'Endpoints:Endpoints', otherwise the pluralizer will generate 'Endpointes'.
@@ -45,7 +45,7 @@ func New() *Args {
4545
func (args *Args) AddFlags(fs *pflag.FlagSet) {
4646
fs.StringVar(&args.OutputDir, "output-dir", "",
4747
"the base directory under which to generate results")
48-
fs.StringVar(&args.OutputPkg, "output-pkg", "",
48+
fs.StringVar(&args.OutputPackage, "output-pkg", "",
4949
"the base Go import-path under which to generate results")
5050
fs.StringSliceVar(&args.PluralExceptions, "plural-exceptions", args.PluralExceptions,
5151
"list of comma separated plural exception definitions in Type:PluralizedType format")
@@ -60,7 +60,7 @@ func (args *Args) Validate() error {
6060
if len(args.OutputDir) == 0 {
6161
return fmt.Errorf("--output-dir must be specified")
6262
}
63-
if len(args.OutputPkg) == 0 {
63+
if len(args.OutputPackage) == 0 {
6464
return fmt.Errorf("--output-pkg must be specified")
6565
}
6666
return nil

cmd/cluster-lister-gen/generators/lister.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ func GetTargets(context *generator.Context, args *args.Args) []generator.Target
118118

119119
subdir := []string{groupPackageName, strings.ToLower(gv.Version.NonEmpty())}
120120
outputDir := filepath.Join(args.OutputDir, filepath.Join(subdir...))
121-
outputPkg := path.Join(args.OutputPkg, path.Join(subdir...))
121+
outputPkg := path.Join(args.OutputPackage, path.Join(subdir...))
122122

123123
targetList = append(targetList, &generator.SimpleTarget{
124124
PkgName: strings.ToLower(gv.Version.NonEmpty()),

0 commit comments

Comments
 (0)