Replace fmt.Sprintf by simple concatenation

In this simple case, it's the fastest and easiest.

Signed-off-by: beorn7 <bjoern@rabenste.in>
This commit is contained in:
beorn7 2019-05-06 00:39:02 +02:00
parent 016273b1f9
commit 547c945a62
1 changed files with 1 additions and 2 deletions

View File

@ -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.