From 547c945a6226045c65f4f8a840d96a456db97651 Mon Sep 17 00:00:00 2001 From: beorn7 Date: Mon, 6 May 2019 00:39:02 +0200 Subject: [PATCH] Replace fmt.Sprintf by simple concatenation In this simple case, it's the fastest and easiest. Signed-off-by: beorn7 --- prometheus/go_collector.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/prometheus/go_collector.go b/prometheus/go_collector.go index ba3b933..fcb5ccb 100644 --- a/prometheus/go_collector.go +++ b/prometheus/go_collector.go @@ -14,7 +14,6 @@ package prometheus import ( - "fmt" "runtime" "runtime/debug" "time" @@ -253,7 +252,7 @@ func NewGoCollector() Collector { } func memstatNamespace(s string) string { - return fmt.Sprintf("go_memstats_%s", s) + return "go_memstats_" + s } // Describe returns all descriptions of the collector.