Skip to content

Commit f1b4eb5

Browse files
thockink8s-publishing-bot
authored andcommitted
Renamed gengo SourcePath -> Dir
Kubernetes-commit: 7a084b33528c6396a5d3442f6fbfbe169366d0d4
1 parent f1f91c8 commit f1b4eb5

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

cmd/conversion-gen/generators/conversion.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ func GetTargets(context *generator.Context, args *args.Args) []generator.Target
325325
&generator.SimpleTarget{
326326
PkgName: filepath.Base(pkg.Path),
327327
PkgPath: pkg.Path,
328-
PkgDir: pkg.SourcePath, // output pkg is the same as the input
328+
PkgDir: pkg.Dir, // output pkg is the same as the input
329329
HeaderComment: boilerplate,
330330
FilterFunc: func(c *generator.Context, t *types.Type) bool {
331331
return t.Name.Package == typesPkg.Path

cmd/deepcopy-gen/generators/deepcopy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ func GetTargets(context *generator.Context, args *args.Args) []generator.Target
189189
&generator.SimpleTarget{
190190
PkgName: strings.Split(filepath.Base(pkg.Path), ".")[0],
191191
PkgPath: pkg.Path,
192-
PkgDir: pkg.SourcePath, // output pkg is the same as the input
192+
PkgDir: pkg.Dir, // output pkg is the same as the input
193193
HeaderComment: boilerplate,
194194
FilterFunc: func(c *generator.Context, t *types.Type) bool {
195195
return t.Name.Package == pkg.Path

cmd/defaulter-gen/generators/defaulter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ func GetTargets(context *generator.Context, args *args.Args) []generator.Target
419419
&generator.SimpleTarget{
420420
PkgName: filepath.Base(pkg.Path),
421421
PkgPath: pkg.Path,
422-
PkgDir: pkg.SourcePath, // output pkg is the same as the input
422+
PkgDir: pkg.Dir, // output pkg is the same as the input
423423
HeaderComment: boilerplate,
424424

425425
FilterFunc: func(c *generator.Context, t *types.Type) bool {

cmd/go-to-protobuf/protobuf/cmd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ func Run(g *Generator) {
182182
log.Fatalf("BUG: can't find input modifiers for %q", input)
183183
}
184184
pkg := c.Universe[input]
185-
protopkg := newProtobufPackage(pkg.Path, pkg.SourcePath, mod.name, mod.allTypes, omitTypes)
185+
protopkg := newProtobufPackage(pkg.Path, pkg.Dir, mod.name, mod.allTypes, omitTypes)
186186
header := append([]byte{}, boilerplate...)
187187
header = append(header, protopkg.HeaderComment...)
188188
protopkg.HeaderComment = header

cmd/prerelease-lifecycle-gen/prerelease-lifecycle-generators/status.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ func GetTargets(context *generator.Context, args *args.Args) []generator.Target
230230
&generator.SimpleTarget{
231231
PkgName: strings.Split(filepath.Base(pkg.Path), ".")[0],
232232
PkgPath: pkg.Path,
233-
PkgDir: pkg.SourcePath, // output pkg is the same as the input
233+
PkgDir: pkg.Dir, // output pkg is the same as the input
234234
HeaderComment: boilerplate,
235235
FilterFunc: func(c *generator.Context, t *types.Type) bool {
236236
return t.Name.Package == pkg.Path

cmd/register-gen/generators/targets.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func GetTargets(context *generator.Context, args *args.Args) []generator.Target
6363
continue
6464
}
6565
registerFileName := "register.go"
66-
searchPath := path.Join(pkg.SourcePath, registerFileName)
66+
searchPath := path.Join(pkg.Dir, registerFileName)
6767
if _, err := os.Stat(path.Join(searchPath)); err == nil {
6868
klog.V(5).Infof("skipping the generation of %s file because %s already exists in the path %s", args.OutputFile, registerFileName, searchPath)
6969
continue
@@ -103,8 +103,8 @@ func GetTargets(context *generator.Context, args *args.Args) []generator.Target
103103
targets = append(targets,
104104
&generator.SimpleTarget{
105105
PkgName: pkg.Name,
106-
PkgPath: pkg.Path, // output to same pkg as input
107-
PkgDir: pkg.SourcePath, // output to same pkg as input
106+
PkgPath: pkg.Path, // output to same pkg as input
107+
PkgDir: pkg.Dir, // output to same pkg as input
108108
HeaderComment: boilerplate,
109109
GeneratorsFunc: func(c *generator.Context) (generators []generator.Generator) {
110110
return []generator.Generator{

0 commit comments

Comments
 (0)