From 1eb29794e6e61f7d2c03de4d6f285bd57bc6dbf8 Mon Sep 17 00:00:00 2001 From: Dmytro Kozlov Date: Thu, 26 May 2022 17:24:01 +0300 Subject: [PATCH] removed redundant return (fixed linter) (#2647) * removed redundant return * updated lint package version --- Makefile | 2 +- lib/promscrape/scrapework.go | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 4be9a69a1..bb7469d97 100644 --- a/Makefile +++ b/Makefile @@ -283,7 +283,7 @@ golangci-lint: install-golangci-lint golangci-lint run --exclude '(SA4003|SA1019|SA5011):' -D errcheck -D structcheck --timeout 2m install-golangci-lint: - which golangci-lint || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin v1.46.1 + which golangci-lint || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin v1.46.2 install-wwhrd: which wwhrd || GO111MODULE=off go get github.com/frapposelli/wwhrd diff --git a/lib/promscrape/scrapework.go b/lib/promscrape/scrapework.go index 28434cfbe..2c4b7827c 100644 --- a/lib/promscrape/scrapework.go +++ b/lib/promscrape/scrapework.go @@ -26,7 +26,7 @@ import ( "github.com/VictoriaMetrics/VictoriaMetrics/lib/proxy" "github.com/VictoriaMetrics/VictoriaMetrics/lib/timerpool" "github.com/VictoriaMetrics/metrics" - xxhash "github.com/cespare/xxhash/v2" + "github.com/cespare/xxhash/v2" ) var ( @@ -377,7 +377,6 @@ func (sw *scrapeWork) scrapeAndLogError(scrapeTimestamp, realTimestamp int64) { logger.Warnf("%s", err) sw.lastErrLogTimestamp = fasttime.UnixTimestamp() sw.errsSuppressedCount = 0 - return } var (