Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix linter (#584)
Browse files Browse the repository at this point in the history
* Update go.mod and go.sum to latest version from networkservicemesh/sdk@main
PR link: networkservicemesh/sdk#1419

Commit: 438ec05
Author: Denis Tingaikin
Date: 2023-02-14 04:39:43 +0300
Message:
  - Moved to using a generic map instead of generated maps (#1419)
* Moved to using a generic map instead of generated maps

Signed-off-by: Ed Warnicke <hagbard@gmail.com>

* fix linter

Signed-off-by: denis-tingaikin <denis.tingajkin@xored.com>

* fix yammlit failture

Signed-off-by: denis-tingaikin <denis.tingajkin@xored.com>

---------

Signed-off-by: Ed Warnicke <hagbard@gmail.com>
Signed-off-by: denis-tingaikin <denis.tingajkin@xored.com>
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>

* fix linter

Signed-off-by: Ruslan Bayandinov <wazsone@ya.ru>

* fix merge

Signed-off-by: Ruslan Bayandinov <wazsone@ya.ru>

* fix dependencies

Signed-off-by: Ruslan Bayandinov <wazsone@ya.ru>

* update generated files

Signed-off-by: Ruslan Bayandinov <wazsone@ya.ru>

---------

Signed-off-by: Ed Warnicke <hagbard@gmail.com>
Signed-off-by: denis-tingaikin <denis.tingajkin@xored.com>
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
Signed-off-by: Ruslan Bayandinov <wazsone@ya.ru>
Signed-off-by: Ruslan Bayandinov <45530296+wazsone@users.noreply.github.com>
Co-authored-by: NSMBot <nsmbot@networkservicmesh.io>
wazsone and NSMBot authored Feb 20, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 3e1b5ab commit f947341
Showing 4 changed files with 14 additions and 4 deletions.
6 changes: 5 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
run:
# concurrency: 6
go: "1.17"
go: "1.19"
timeout: 2m
issues-exit-code: 1
tests: true
@@ -167,3 +167,7 @@ issues:
exclude-use-default: false
max-issues-per-linter: 0
max-same-issues: 0
exclude-rules:
- path: main.go
linters:
- revive
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@ go 1.18

require (
github.com/antonfisher/nested-logrus-formatter v1.3.1
github.com/edwarnicke/genericsync v0.0.0-20220910010113-61a344f9bc29
github.com/edwarnicke/grpcfd v1.1.2
github.com/edwarnicke/serialize v1.0.7
github.com/kelseyhightower/envconfig v1.4.0
@@ -21,7 +22,6 @@ require (
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/edwarnicke/exechelper v1.0.2 // indirect
github.com/edwarnicke/genericsync v0.0.0-20220910010113-61a344f9bc29 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/ghodss/yaml v1.0.0 // indirect
github.com/go-logr/logr v1.2.3 // indirect
2 changes: 2 additions & 0 deletions internal/imports/imports_linux.go
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@ import (
_ "crypto/tls"
_ "fmt"
_ "github.com/antonfisher/nested-logrus-formatter"
_ "github.com/edwarnicke/genericsync"
_ "github.com/edwarnicke/grpcfd"
_ "github.com/edwarnicke/serialize"
_ "github.com/kelseyhightower/envconfig"
@@ -43,6 +44,7 @@ import (
_ "github.com/networkservicemesh/sdk/pkg/tools/token"
_ "github.com/networkservicemesh/sdk/pkg/tools/tracing"
_ "github.com/sirupsen/logrus"
_ "github.com/spiffe/go-spiffe/v2/spiffeid"
_ "github.com/spiffe/go-spiffe/v2/spiffetls/tlsconfig"
_ "github.com/spiffe/go-spiffe/v2/svid/x509svid"
_ "github.com/spiffe/go-spiffe/v2/workloadapi"
8 changes: 6 additions & 2 deletions internal/manager/manager.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// Copyright (c) 2020-2022 Doc.ai and/or its affiliates.
//
// Copyright (c) 2022 Nordix and/or its affiliates.
//
// Copyright (c) 2023 Cisco and/or its affiliates.
//
// SPDX-License-Identifier: Apache-2.0
//
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -30,10 +33,11 @@ import (

"github.com/networkservicemesh/sdk/pkg/tools/log/logruslogger"
"github.com/networkservicemesh/sdk/pkg/tools/log/spanlogger"
"github.com/networkservicemesh/sdk/pkg/tools/spire"

"github.com/edwarnicke/genericsync"
"github.com/edwarnicke/grpcfd"
"github.com/sirupsen/logrus"
"github.com/spiffe/go-spiffe/v2/spiffeid"
"github.com/spiffe/go-spiffe/v2/spiffetls/tlsconfig"
"github.com/spiffe/go-spiffe/v2/svid/x509svid"
"github.com/spiffe/go-spiffe/v2/workloadapi"
@@ -119,7 +123,7 @@ func RunNsmgr(ctx context.Context, configuration *config.Config) error {
tlsClientConfig.MinVersion = tls.VersionTLS12
tlsServerConfig := tlsconfig.MTLSServerConfig(m.source, m.source, tlsconfig.AuthorizeAny())
tlsServerConfig.MinVersion = tls.VersionTLS12
spiffeIDConnMap := spire.SpiffeIDConnectionMap{}
spiffeIDConnMap := genericsync.Map[spiffeid.ID, *genericsync.Map[string, struct{}]]{}
mgrOptions := []nsmgr.Option{
nsmgr.WithName(configuration.Name),
nsmgr.WithURL(u.String()),

0 comments on commit f947341

Please sign in to comment.