We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6535fd4 commit b6bd3b4Copy full SHA for b6bd3b4
prometheus/promsafe/safe_test.go
@@ -16,6 +16,7 @@ package promsafe_test
16
import (
17
"fmt"
18
"log"
19
+ "strconv"
20
"testing"
21
22
"github.com/prometheus/client_golang/prometheus"
@@ -113,8 +114,8 @@ type TestLabelsFast struct {
113
114
func (t TestLabelsFast) ToPrometheusLabels() prometheus.Labels {
115
return prometheus.Labels{
116
"label1": t.Label1,
- "label2": fmt.Sprintf("%d", t.Label2),
117
- "label3": fmt.Sprintf("%t", t.Label3),
+ "label2": strconv.Itoa(t.Label2),
118
+ "label3": strconv.FormatBool(t.Label3),
119
}
120
121
func (t TestLabelsFast) ToLabelNames() []string {
0 commit comments