From cb937494b70ee937b596373eab7a601b229f4509 Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Mon, 12 Aug 2024 15:58:39 -0700 Subject: [PATCH] Bump gengo version Fix one breakage after gengo refactored named function results. --- go.mod | 2 +- go.sum | 4 ++-- pkg/generators/openapi.go | 2 +- test/integration/go.mod | 2 +- test/integration/go.sum | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index f604f6b6b..bf6c6e9d6 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( google.golang.org/protobuf v1.34.2 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 - k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 + k8s.io/gengo/v2 v2.0.0-20240812201722-3b05ca7b6e59 k8s.io/klog/v2 v2.130.1 k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd diff --git a/go.sum b/go.sum index 1fde98b36..eb58dc034 100644 --- a/go.sum +++ b/go.sum @@ -79,8 +79,8 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 h1:NGrVE502P0s0/1hudf8zjgwki1X/TByhmAoILTarmzo= -k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70/go.mod h1:VH3AT8AaQOqiGjMF9p0/IM1Dj+82ZwjfxUP1IxaHE+8= +k8s.io/gengo/v2 v2.0.0-20240812201722-3b05ca7b6e59 h1:PfhT3P5Y7psqhl0D77Rj2B7RH77eid/wBttxlMTxXag= +k8s.io/gengo/v2 v2.0.0-20240812201722-3b05ca7b6e59/go.mod h1:VH3AT8AaQOqiGjMF9p0/IM1Dj+82ZwjfxUP1IxaHE+8= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A= diff --git a/pkg/generators/openapi.go b/pkg/generators/openapi.go index b0fa8272a..c5c009381 100644 --- a/pkg/generators/openapi.go +++ b/pkg/generators/openapi.go @@ -249,7 +249,7 @@ func methodReturnsValue(mt *types.Type, pkg, name string) bool { return false } r := mt.Signature.Results[0] - return r.Name.Name == name && r.Name.Package == pkg + return r.Type.Name.Name == name && r.Type.Name.Package == pkg } func hasOpenAPIV3DefinitionMethod(t *types.Type) bool { diff --git a/test/integration/go.mod b/test/integration/go.mod index 33df6d0d3..c35513525 100644 --- a/test/integration/go.mod +++ b/test/integration/go.mod @@ -37,6 +37,6 @@ require ( golang.org/x/tools v0.24.0 // indirect google.golang.org/protobuf v1.34.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 // indirect + k8s.io/gengo/v2 v2.0.0-20240812201722-3b05ca7b6e59 // indirect k8s.io/klog/v2 v2.130.1 // indirect ) diff --git a/test/integration/go.sum b/test/integration/go.sum index 8bae83869..a21a51384 100644 --- a/test/integration/go.sum +++ b/test/integration/go.sum @@ -78,8 +78,8 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 h1:NGrVE502P0s0/1hudf8zjgwki1X/TByhmAoILTarmzo= -k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70/go.mod h1:VH3AT8AaQOqiGjMF9p0/IM1Dj+82ZwjfxUP1IxaHE+8= +k8s.io/gengo/v2 v2.0.0-20240812201722-3b05ca7b6e59 h1:PfhT3P5Y7psqhl0D77Rj2B7RH77eid/wBttxlMTxXag= +k8s.io/gengo/v2 v2.0.0-20240812201722-3b05ca7b6e59/go.mod h1:VH3AT8AaQOqiGjMF9p0/IM1Dj+82ZwjfxUP1IxaHE+8= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A=