Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving location of statuszTmpl #206

Merged
merged 9 commits into from
Feb 5, 2020
2 changes: 1 addition & 1 deletion cmd/stackdriver-prometheus-sidecar/statusz.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import (

var (
serverStart = time.Now()
statuszTmpl = template.Must(template.ParseFiles("statusz-tmpl.html"))
)

type statuszHandler struct {
Expand Down Expand Up @@ -80,6 +79,7 @@ func (h *statuszHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {

data.Config = h.cfg

var statuszTmpl = template.Must(template.ParseFiles("statusz-tmpl.html"))
if err := statuszTmpl.Execute(w, data); err != nil {
level.Error(h.logger).Log("msg", "couldn't execute template", "err", err)
}
Expand Down