diff --git a/go.mod b/go.mod index 50518a421..d93f2e786 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.20 require ( github.com/fatih/color v1.15.0 - github.com/gobuffalo/flect v0.3.0 + github.com/gobuffalo/flect v1.0.2 github.com/google/go-cmp v0.5.9 github.com/onsi/ginkgo v1.16.5 github.com/onsi/gomega v1.27.6 diff --git a/go.sum b/go.sum index 65fc96e86..b6a3faa12 100644 --- a/go.sum +++ b/go.sum @@ -13,8 +13,8 @@ github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= -github.com/gobuffalo/flect v0.3.0 h1:erfPWM+K1rFNIQeRPdeEXxo8yFr/PO17lhRnS8FUrtk= -github.com/gobuffalo/flect v0.3.0/go.mod h1:5pf3aGnsvqvCj50AVni7mJJF8ICxGZ8HomberC3pXLE= +github.com/gobuffalo/flect v1.0.2 h1:eqjPGSo2WmjgY2XlpGwo2NXgL3RucAKo4k4qQMNA5sA= +github.com/gobuffalo/flect v1.0.2/go.mod h1:A5msMlrHtLqh9umBSnvabjsMrCcCpAyzglnDvkbYKHs= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -75,11 +75,13 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= diff --git a/pkg/crd/gen_integration_test.go b/pkg/crd/gen_integration_test.go index cc836880b..7d256ca5b 100644 --- a/pkg/crd/gen_integration_test.go +++ b/pkg/crd/gen_integration_test.go @@ -112,7 +112,7 @@ var _ = Describe("CRD Generation proper defaulting", func() { expectedFileFoos, err := ioutil.ReadFile(filepath.Join(genDir, "bar.example.com_foos.yaml")) Expect(err).NotTo(HaveOccurred()) expectedFileFoos = fixAnnotations(expectedFileFoos) - expectedFileZoos, err := ioutil.ReadFile(filepath.Join(genDir, "zoo", "bar.example.com_zooes.yaml")) + expectedFileZoos, err := ioutil.ReadFile(filepath.Join(genDir, "zoo", "bar.example.com_zoos.yaml")) Expect(err).NotTo(HaveOccurred()) expectedFileZoos = fixAnnotations(expectedFileZoos) diff --git a/pkg/crd/testdata/gen/zoo/bar.example.com_zooes.v1beta1.yaml b/pkg/crd/testdata/gen/zoo/bar.example.com_zoos.v1beta1.yaml similarity index 98% rename from pkg/crd/testdata/gen/zoo/bar.example.com_zooes.v1beta1.yaml rename to pkg/crd/testdata/gen/zoo/bar.example.com_zoos.v1beta1.yaml index 207bb0230..c6de8b08b 100644 --- a/pkg/crd/testdata/gen/zoo/bar.example.com_zooes.v1beta1.yaml +++ b/pkg/crd/testdata/gen/zoo/bar.example.com_zoos.v1beta1.yaml @@ -10,7 +10,7 @@ spec: names: kind: Zoo listKind: ZooList - plural: zooes + plural: zoos singular: zoo scope: Namespaced validation: diff --git a/pkg/crd/testdata/gen/zoo/bar.example.com_zooes.yaml b/pkg/crd/testdata/gen/zoo/bar.example.com_zoos.yaml similarity index 97% rename from pkg/crd/testdata/gen/zoo/bar.example.com_zooes.yaml rename to pkg/crd/testdata/gen/zoo/bar.example.com_zoos.yaml index 7509cc0ce..e3e2b65cf 100644 --- a/pkg/crd/testdata/gen/zoo/bar.example.com_zooes.yaml +++ b/pkg/crd/testdata/gen/zoo/bar.example.com_zoos.yaml @@ -4,13 +4,13 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: (devel) - name: zooes.bar.example.com + name: zoos.bar.example.com spec: group: bar.example.com names: kind: Zoo listKind: ZooList - plural: zooes + plural: zoos singular: zoo scope: Namespaced versions: diff --git a/pkg/crd/testdata/gen/zoo/zoo_types.go b/pkg/crd/testdata/gen/zoo/zoo_types.go index 1172b3d8a..09472bf82 100644 --- a/pkg/crd/testdata/gen/zoo/zoo_types.go +++ b/pkg/crd/testdata/gen/zoo/zoo_types.go @@ -14,7 +14,7 @@ limitations under the License. */ //go:generate ../../../../.run-controller-gen.sh crd:crdVersions=v1beta1 paths=. output:dir=. -//go:generate mv bar.example.com_zooes.yaml bar.example.com_zooes.v1beta1.yaml +//go:generate mv bar.example.com_zoos.yaml bar.example.com_zoos.v1beta1.yaml //go:generate ../../../../.run-controller-gen.sh crd:crdVersions=v1 paths=. output:dir=. // +groupName=bar.example.com