mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 13:44:05 -08:00
Use Sprintf instead of string concatenation.
This commit is contained in:
parent
1c091a9723
commit
0f775a4178
|
@ -16,6 +16,7 @@ package web
|
|||
import (
|
||||
"code.google.com/p/gorest"
|
||||
"flag"
|
||||
"fmt"
|
||||
"github.com/prometheus/client_golang"
|
||||
"github.com/prometheus/client_golang/exp"
|
||||
"github.com/prometheus/prometheus/appstate"
|
||||
|
@ -53,7 +54,7 @@ func StartServing(appState *appstate.ApplicationState) {
|
|||
|
||||
func getTemplate(name string) (t *template.Template, err error) {
|
||||
if *useLocalAssets {
|
||||
return template.ParseFiles("web/templates/_base.html", "web/templates/"+name+".html")
|
||||
return template.ParseFiles("web/templates/_base.html", fmt.Sprintf("web/templates/%s.html", name))
|
||||
}
|
||||
|
||||
t = template.New("_base")
|
||||
|
|
Loading…
Reference in a new issue