diff options
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -15,7 +15,7 @@ var templates *template.Template func main() { configPath := parseFlags() - c := parseConfig(configPath) + parseConfig(configPath) var err error templates, err = template.ParseFS(static, "templates/index.html") @@ -23,14 +23,14 @@ func main() { log.Fatal(err) } - http.HandleFunc("/", index(c.Devices)) + http.HandleFunc("/", index(config.Devices)) http.HandleFunc("/api", api) http.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.FS(static)))) - fmt.Printf("Serving at http://%s\n", c.Web.Listen) + fmt.Printf("Serving at http://%s\n", config.Web.Listen) - log.Fatal(http.ListenAndServe(c.Web.Listen.String(), nil)) + log.Fatal(http.ListenAndServe(config.Web.Listen.String(), nil)) } // parseFlags() handles command line interface (CLI) flags. |