From 462121fd85cfdc61f9a899b5bf40dfc4f8b656f4 Mon Sep 17 00:00:00 2001 From: Boshi Lian Date: Sat, 14 May 2022 13:39:08 +0000 Subject: [PATCH] fix lint --- sshpiperd/upstream/grpcupstream/plugin.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sshpiperd/upstream/grpcupstream/plugin.go b/sshpiperd/upstream/grpcupstream/plugin.go index 5912a43d..a75701ea 100644 --- a/sshpiperd/upstream/grpcupstream/plugin.go +++ b/sshpiperd/upstream/grpcupstream/plugin.go @@ -12,6 +12,7 @@ import ( "github.com/tg123/sshpiper/sshpiperd/upstream" grpc "google.golang.org/grpc" "google.golang.org/grpc/credentials" + "google.golang.org/grpc/credentials/insecure" ) type plugin struct { @@ -43,7 +44,7 @@ func (p *plugin) Init(logger *log.Logger) error { var secopt grpc.DialOption if p.Config.Insecure { - secopt = grpc.WithInsecure() + secopt = grpc.WithTransportCredentials(insecure.NewCredentials()) } else { clientCert, err := tls.LoadX509KeyPair(p.Config.Cert, p.Config.Key)