From 043f35632eab3c380b68bef384259bcf00037d8d Mon Sep 17 00:00:00 2001 From: Ivan <2103732+codebien@users.noreply.github.com> Date: Thu, 31 Mar 2022 11:43:01 +0200 Subject: [PATCH] grpc: Replace WithInsecure grpc.WithInsecure has been deprecated, replaced with the suggested alterative. --- js/modules/k6/grpc/client.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/modules/k6/grpc/client.go b/js/modules/k6/grpc/client.go index 7dacaa5abeb..4d975730a6a 100644 --- a/js/modules/k6/grpc/client.go +++ b/js/modules/k6/grpc/client.go @@ -38,6 +38,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials" + "google.golang.org/grpc/credentials/insecure" "google.golang.org/grpc/metadata" grpcstats "google.golang.org/grpc/stats" "google.golang.org/grpc/status" @@ -151,7 +152,7 @@ func (c *Client) Connect(addr string, params map[string]interface{}) (bool, erro opts = append(opts, grpc.WithTransportCredentials(credentials.NewTLS(tlsCfg))) } else { - opts = append(opts, grpc.WithInsecure()) + opts = append(opts, grpc.WithTransportCredentials(insecure.NewCredentials())) } if ua := state.Options.UserAgent; ua.Valid {