From d558d407f97982305a56eef3a59bbfa6c9b1f5b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E7=8E=AE=E6=96=87?= Date: Mon, 25 Nov 2024 00:30:33 +0800 Subject: [PATCH] remove old github.com/golang/protobuf gnostic-models has not been updated for over 1 year. Just use its latest main branch, as in gnostic repo --- go.mod | 3 +-- go.sum | 6 ++---- pkg/handler/handler.go | 2 +- pkg/handler3/handler.go | 2 +- test/integration/go.mod | 3 +-- test/integration/go.sum | 6 ++---- 6 files changed, 8 insertions(+), 14 deletions(-) diff --git a/go.mod b/go.mod index 20e35a477..2a2df20a2 100644 --- a/go.mod +++ b/go.mod @@ -8,8 +8,7 @@ require ( github.com/emicklei/go-restful/v3 v3.11.0 github.com/go-openapi/jsonreference v0.20.1 github.com/go-openapi/swag v0.23.0 - github.com/golang/protobuf v1.5.4 - github.com/google/gnostic-models v0.6.8 + github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 github.com/google/go-cmp v0.6.0 github.com/google/gofuzz v1.2.0 github.com/google/uuid v1.6.0 diff --git a/go.sum b/go.sum index 3a0646be9..46d0c6fd9 100644 --- a/go.sum +++ b/go.sum @@ -20,10 +20,8 @@ github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+Gr github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= -github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= -github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= -github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= +github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 h1:0VpGH+cDhbDtdcweoyCVsF3fhN8kejK6rFe/2FFX2nU= +github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49/go.mod h1:BkkQ4L1KS1xMt2aWSPStnn55ChGC0DPOn2FQYj+f25M= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= diff --git a/pkg/handler/handler.go b/pkg/handler/handler.go index 5fc629773..5102e7125 100644 --- a/pkg/handler/handler.go +++ b/pkg/handler/handler.go @@ -26,10 +26,10 @@ import ( "github.com/NYTimes/gziphandler" "github.com/emicklei/go-restful/v3" - "github.com/golang/protobuf/proto" openapi_v2 "github.com/google/gnostic-models/openapiv2" "github.com/google/uuid" "github.com/munnerz/goautoneg" + "google.golang.org/protobuf/proto" klog "k8s.io/klog/v2" "k8s.io/kube-openapi/pkg/builder" diff --git a/pkg/handler3/handler.go b/pkg/handler3/handler.go index fc4563488..10f0b385f 100644 --- a/pkg/handler3/handler.go +++ b/pkg/handler3/handler.go @@ -29,10 +29,10 @@ import ( "sync" "time" - "github.com/golang/protobuf/proto" openapi_v3 "github.com/google/gnostic-models/openapiv3" "github.com/google/uuid" "github.com/munnerz/goautoneg" + "google.golang.org/protobuf/proto" "k8s.io/klog/v2" "k8s.io/kube-openapi/pkg/cached" diff --git a/test/integration/go.mod b/test/integration/go.mod index 3fc7c00f5..0b4e2595c 100644 --- a/test/integration/go.mod +++ b/test/integration/go.mod @@ -19,8 +19,7 @@ require ( github.com/go-openapi/jsonreference v0.20.1 // indirect github.com/go-openapi/swag v0.23.0 // indirect github.com/go-task/slim-sprig/v3 v3.0.0 // indirect - github.com/golang/protobuf v1.5.4 // indirect - github.com/google/gnostic-models v0.6.8 // indirect + github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 // indirect diff --git a/test/integration/go.sum b/test/integration/go.sum index 06121db95..67185071d 100644 --- a/test/integration/go.sum +++ b/test/integration/go.sum @@ -20,10 +20,8 @@ github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+Gr github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= -github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= -github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= -github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= +github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 h1:0VpGH+cDhbDtdcweoyCVsF3fhN8kejK6rFe/2FFX2nU= +github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49/go.mod h1:BkkQ4L1KS1xMt2aWSPStnn55ChGC0DPOn2FQYj+f25M= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=