update to go 1.17 (#167)

* chore: update to go 1.17

* fix: update workflows go version

* fix: golint errors/update grpc
This commit is contained in:
Mikhail Bragin
2021-12-21 10:02:25 +01:00
committed by GitHub
parent fdc11fff47
commit 8c75ef8bef
8 changed files with 622 additions and 149 deletions

View File

@@ -13,6 +13,7 @@ import (
"google.golang.org/grpc"
"google.golang.org/grpc/connectivity"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/keepalive"
"io"
"time"
@@ -28,7 +29,7 @@ type Client struct {
// NewClient creates a new client to Management service
func NewClient(ctx context.Context, addr string, ourPrivateKey wgtypes.Key, tlsEnabled bool) (*Client, error) {
transportOption := grpc.WithInsecure()
transportOption := grpc.WithTransportCredentials(insecure.NewCredentials())
if tlsEnabled {
transportOption = grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{}))