From 5d7833c89b9ae73fa6b53c8d200d2e549a147bdb Mon Sep 17 00:00:00 2001 From: Dmitrii Stepanov Date: Mon, 11 Dec 2023 13:06:03 +0300 Subject: [PATCH] [#857] golangci: Add perfsprint linter Signed-off-by: Dmitrii Stepanov --- .golangci.yml | 1 + pkg/metrics/writecache.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 5c7e9d91..1404dd10 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -79,5 +79,6 @@ linters: - contextcheck - importas - truecloudlab-linters + - perfsprint disable-all: true fast: false diff --git a/pkg/metrics/writecache.go b/pkg/metrics/writecache.go index c8f815ca..ea3d8742 100644 --- a/pkg/metrics/writecache.go +++ b/pkg/metrics/writecache.go @@ -1,7 +1,7 @@ package metrics import ( - "fmt" + "strconv" "time" "git.frostfs.info/TrueCloudLab/frostfs-observability/metrics" @@ -52,7 +52,7 @@ func (m *writeCacheMetrics) AddMethodDuration(shardID string, method string, suc m.methodDuration.With( prometheus.Labels{ shardIDLabel: shardID, - successLabel: fmt.Sprintf("%v", success), + successLabel: strconv.FormatBool(success), storageLabel: storageType, methodLabel: method, },