From 0f775a417829931780a78477629b8c2488301f12 Mon Sep 17 00:00:00 2001 From: Johannes 'fish' Ziemke Date: Fri, 5 Apr 2013 13:41:52 +0200 Subject: [PATCH] Use Sprintf instead of string concatenation. --- web/web.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/web.go b/web/web.go index babf467c2..2a25f9d9c 100644 --- a/web/web.go +++ b/web/web.go @@ -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")