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/codes"
"google.golang.org/grpc/connectivity"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/keepalive"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
@@ -56,7 +57,7 @@ func (c *Client) Close() error {
// NewClient creates a new Signal client
func NewClient(ctx context.Context, addr string, key wgtypes.Key, tlsEnabled bool) (*Client, error) {
transportOption := grpc.WithInsecure()
transportOption := grpc.WithTransportCredentials(insecure.NewCredentials())
if tlsEnabled {
transportOption = grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{}))