From 7df483975e6ffa279c142248dded468245fa85c0 Mon Sep 17 00:00:00 2001 From: James Peach Date: Mon, 20 Nov 2023 09:57:03 +1100 Subject: [PATCH] Use the v2 protobuf module internally. There's only one place where we use the protobug APIs, so switch to the v2 protobuf module. This updates #524. Signed-off-by: James Peach --- go.mod | 3 +-- go.sum | 1 - pkg/client/sotw/v3/client.go | 4 ++-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 7d701b4f72..9e7ed651b3 100644 --- a/go.mod +++ b/go.mod @@ -19,9 +19,8 @@ require ( require ( github.com/davecgh/go-spew v1.1.1 // indirect - github.com/kr/pretty v0.3.0 // indirect + github.com/kr/pretty v0.3.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/rogpeppe/go-internal v1.9.0 // indirect golang.org/x/net v0.17.0 // indirect golang.org/x/sys v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect diff --git a/go.sum b/go.sum index 4b5dcda186..fb7bee3edf 100644 --- a/go.sum +++ b/go.sum @@ -931,7 +931,6 @@ github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa02 github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= diff --git a/pkg/client/sotw/v3/client.go b/pkg/client/sotw/v3/client.go index 32ce2020f0..d04bb6d941 100644 --- a/pkg/client/sotw/v3/client.go +++ b/pkg/client/sotw/v3/client.go @@ -21,11 +21,11 @@ import ( "io" "sync" - "github.com/golang/protobuf/ptypes/any" status "google.golang.org/genproto/googleapis/rpc/status" "google.golang.org/grpc" "google.golang.org/grpc/codes" grpcStatus "google.golang.org/grpc/status" + "google.golang.org/protobuf/types/known/anypb" core "github.com/envoyproxy/go-control-plane/envoy/config/core/v3" discovery "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3" @@ -54,7 +54,7 @@ type ADSClient interface { // For the time being it only contains the Resources from server. This can be extended with // other response details. For example some metadata from DiscoveryResponse. type Response struct { - Resources []*any.Any + Resources []*anypb.Any } type adsClient struct {