From 44d8e732cffee16c7c3128be0f264b49ad62b7e9 Mon Sep 17 00:00:00 2001 From: Ramil Mirhasanov Date: Fri, 11 Nov 2022 12:08:50 +0300 Subject: [PATCH] client/v3: replace deprecated grpc.WithInsecure() Deprecated: use WithTransportCredentials and insecure.NewCredentials() instead. Will be supported throughout 1.x. Signed-off-by: Ramil Mirhasanov --- client/v3/client.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/v3/client.go b/client/v3/client.go index 23069468b39..feaaf7d53d7 100644 --- a/client/v3/client.go +++ b/client/v3/client.go @@ -32,6 +32,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" grpccredentials "google.golang.org/grpc/credentials" + "google.golang.org/grpc/credentials/insecure" "google.golang.org/grpc/keepalive" "google.golang.org/grpc/status" ) @@ -231,7 +232,7 @@ func (c *Client) dialSetupOpts(creds grpccredentials.TransportCredentials, dopts if creds != nil { opts = append(opts, grpc.WithTransportCredentials(creds)) } else { - opts = append(opts, grpc.WithInsecure()) + opts = append(opts, grpc.WithTransportCredentials(insecure.NewCredentials())) } // Interceptor retry and backoff.