From a5e18b02296f060e2ea11cea73edb7ba085742b3 Mon Sep 17 00:00:00 2001 From: Johannes 'fish' Ziemke Date: Thu, 21 Mar 2013 15:55:48 +0100 Subject: [PATCH] Rename localAssets to useLocalAssets. --- web/status.go | 2 +- web/web.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/status.go b/web/status.go index 887867c5a..07f310b3d 100644 --- a/web/status.go +++ b/web/status.go @@ -42,7 +42,7 @@ func (h *StatusHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { } var t *template.Template - if *localAssets { + if *useLocalAssets { t, _ = template.ParseFiles("web/templates/status.html") } else { templateFile, err := blob.GetFile(blob.TemplateFiles, "status.html") diff --git a/web/web.go b/web/web.go index 6e167e3e6..74e5f1222 100644 --- a/web/web.go +++ b/web/web.go @@ -27,7 +27,7 @@ import ( // Commandline flags. var ( listenAddress = flag.String("listenAddress", ":9090", "Address to listen on for web interface.") - localAssets = flag.Bool("localAssets", false, "Read assets/templates from file instead of binary.") + useLocalAssets = flag.Bool("localAssets", false, "Read assets/templates from file instead of binary.") ) func StartServing(appState *appstate.ApplicationState) { @@ -37,7 +37,7 @@ func StartServing(appState *appstate.ApplicationState) { http.Handle("/status", &StatusHandler{appState: appState}) http.Handle("/api/", gorest.Handle()) http.Handle("/metrics.json", exporter) - if *localAssets { + if *useLocalAssets { http.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("web/static")))) } else { http.Handle("/static/", http.StripPrefix("/static/", new(blob.Handler)))