From 77355ad215a7143fcbabd791736f012a529e14f1 Mon Sep 17 00:00:00 2001 From: Imran Pochi Date: Wed, 26 Jul 2023 20:57:44 +0530 Subject: [PATCH] golangci-lint: update due to high resource usage Encountering this [issue](https://github.com/golangci/golangci-lint/issues/3565) when runing `make lint` Signed-off-by: Imran Pochi --- Makefile | 2 +- pkg/agent/client.go | 6 +++--- pkg/server/server.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 340cd7056..cd7389d14 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ endif GOOS ?= $(shell go env GOOS) GOARCH ?= $(shell go env GOARCH) INSTALL_LOCATION:=$(shell go env GOPATH)/bin -GOLANGCI_LINT_VERSION ?= 1.50.1 +GOLANGCI_LINT_VERSION ?= 1.51.2 GOSEC_VERSION ?= 2.13.1 REGISTRY ?= gcr.io/$(shell gcloud config get-value project) diff --git a/pkg/agent/client.go b/pkg/agent/client.go index 47833040c..16b1df244 100644 --- a/pkg/agent/client.go +++ b/pkg/agent/client.go @@ -20,8 +20,8 @@ import ( "context" "fmt" "io" - "os" "net" + "os" runpprof "runtime/pprof" "strconv" "sync" @@ -29,8 +29,8 @@ import ( "time" "google.golang.org/grpc" - "google.golang.org/grpc/connectivity" "google.golang.org/grpc/codes" + "google.golang.org/grpc/connectivity" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" "k8s.io/klog/v2" @@ -335,7 +335,7 @@ func (a *Client) Serve() { return } if status.Code(err) == codes.Canceled { - klog.V(2).InfoS("stream canceled", "serverID", a.serverID, "agentID", a.agentID) + klog.V(2).InfoS("stream canceled", "serverID", a.serverID, "agentID", a.agentID) } else { klog.ErrorS(err, "could not read stream", "serverID", a.serverID, "agentID", a.agentID) } diff --git a/pkg/server/server.go b/pkg/server/server.go index 3e119803c..e6031aa15 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -451,7 +451,7 @@ func NewProxyServer(serverID string, proxyStrategies []ProxyStrategy, serverCoun } return &ProxyServer{ - established: make(map[string](map[int64]*ProxyClientConnection)), + established: make(map[string](map[int64]*ProxyClientConnection)), PendingDial: NewPendingDialManager(), serverID: serverID, serverCount: serverCount,