Use string concatenation rather than Sprintf

Signed-off-by: bakins <brian@akins.org>
This commit is contained in:
bakins 2019-12-31 16:34:47 -05:00 committed by bakins
parent d888f25cb6
commit e60a0b6d00

View file

@ -14,8 +14,7 @@
package mapper
import (
"fmt"
"github.com/hashicorp/golang-lru"
lru "github.com/hashicorp/golang-lru"
"github.com/prometheus/client_golang/prometheus"
)
@ -81,7 +80,7 @@ func (m *MetricMapperLRUCache) trackCacheLength() {
}
func formatKey(metricString string, metricType MetricType) string {
return fmt.Sprintf("%s.%s", string(metricType), metricString)
return string(metricType) + "." + metricString
}
func NewMetricMapperNoopCache() *MetricMapperNoopCache {