Skip to content

Commit b6bd3b4

Browse files
committed
make linter happier even in tests
1 parent 6535fd4 commit b6bd3b4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

prometheus/promsafe/safe_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ package promsafe_test
1616
import (
1717
"fmt"
1818
"log"
19+
"strconv"
1920
"testing"
2021

2122
"github.com/prometheus/client_golang/prometheus"
@@ -113,8 +114,8 @@ type TestLabelsFast struct {
113114
func (t TestLabelsFast) ToPrometheusLabels() prometheus.Labels {
114115
return prometheus.Labels{
115116
"label1": t.Label1,
116-
"label2": fmt.Sprintf("%d", t.Label2),
117-
"label3": fmt.Sprintf("%t", t.Label3),
117+
"label2": strconv.Itoa(t.Label2),
118+
"label3": strconv.FormatBool(t.Label3),
118119
}
119120
}
120121
func (t TestLabelsFast) ToLabelNames() []string {

0 commit comments

Comments
 (0)