Skip to content

Commit f89a034

Browse files
Merge pull request kcp-dev#71 from stevekuznetsov/skuznets/relocate-fakes
✨ clientgen: move fakes around to match upstream
2 parents 7a6ace6 + 11eb033 commit f89a034

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+17
-17
lines changed

examples/pkg/kcp/clients/clientset/versioned/fake/clientset.go

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/pkg/kcpexisting/clients/clientset/versioned/fake/clientset.go

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/generators/clientgen/clientgen.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ func (g Generator) Generate(ctx *genall.GenerationContext) error {
170170
return err
171171
}
172172

173-
fakeGroupDir := filepath.Join(fakeClientsetDir, "typed", group.PackageName(), version.PackageName())
173+
fakeGroupDir := filepath.Join(groupDir, "fake")
174174
outputFile = filepath.Join(fakeGroupDir, group.PackageName()+"_client.go")
175175
logger = logger.WithValues(
176176
"group", group.String(),

pkg/internal/clientgen/fake_clientset.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ import (
6969
{{end -}}
7070
{{range .groups}} kcp{{.PackageAlias}} "{{$.packagePath}}/typed/{{.Group.PackageName}}/{{.Version.PackageName}}"
7171
{{end -}}
72-
{{range .groups}} fake{{.PackageAlias}} "{{$.packagePath}}/fake/typed/{{.Group.PackageName}}/{{.Version.PackageName}}"
72+
{{range .groups}} fake{{.PackageAlias}} "{{$.packagePath}}/typed/{{.Group.PackageName}}/{{.Version.PackageName}}/fake"
7373
{{end -}}
7474
)
7575

pkg/internal/informergen/informer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ type Informer struct {
4242
PackagePath string
4343

4444
// ClientsetPackagePath is the package under which the cluster-aware client-set will be exposed.
45-
// e.g. "github.com/kcp-dev/client-go/clients/clientset/versioned"
45+
// e.g. "github.com/kcp-dev/client-go/kubernetes"
4646
// TODO(skuznets) we should be able to figure this out from the output dir, ideally
4747
ClientsetPackagePath string
4848

0 commit comments

Comments
 (0)