Skip to content
Snippets Groups Projects
Commit 034506ec authored by Kevin Lyda's avatar Kevin Lyda :speech_balloon:
Browse files

Check Volts each page load.

parent d3ea36bc
Branches
No related tags found
No related merge requests found
Pipeline #
......@@ -36,6 +36,7 @@ var indexPg indexPage
func indexHandler(w http.ResponseWriter, r *http.Request) {
indexPg.CPM, _ = gc.GetCPM()
indexPg.Volts, _ = gc.Volts()
t, err := template.ParseFiles(path.Join(*templateDir, "index.html"))
if err != nil {
log.Printf("Template error: %s\n", err)
......@@ -50,7 +51,6 @@ func main() {
indexPg.Model = gc.Model()
indexPg.Version = gc.Version()
indexPg.Serial = gc.Serial()
indexPg.Volts, _ = gc.Volts()
http.HandleFunc("/", indexHandler)
http.Handle("/metrics", promhttp.Handler())
log.Fatal(http.ListenAndServe(*addr, nil))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment