forked from mirrors/statsd_exporter
Use string concatenation rather than Sprintf
Signed-off-by: bakins <brian@akins.org>
This commit is contained in:
parent
d888f25cb6
commit
e60a0b6d00
1 changed files with 2 additions and 3 deletions
|
@ -14,8 +14,7 @@
|
||||||
package mapper
|
package mapper
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
lru "github.com/hashicorp/golang-lru"
|
||||||
"github.com/hashicorp/golang-lru"
|
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -81,7 +80,7 @@ func (m *MetricMapperLRUCache) trackCacheLength() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func formatKey(metricString string, metricType MetricType) string {
|
func formatKey(metricString string, metricType MetricType) string {
|
||||||
return fmt.Sprintf("%s.%s", string(metricType), metricString)
|
return string(metricType) + "." + metricString
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewMetricMapperNoopCache() *MetricMapperNoopCache {
|
func NewMetricMapperNoopCache() *MetricMapperNoopCache {
|
||||||
|
|
Loading…
Reference in a new issue