diff --git a/main.go b/main.go index 64c3f50..09c9ac5 100644 --- a/main.go +++ b/main.go @@ -50,7 +50,11 @@ func main() { panic(err) } - go api.AutoRefresh(context.Background()) + go func() { + if err := api.AutoRefresh(context.Background()); err != nil { + panic(err) + } + }() go func() { http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { @@ -71,7 +75,6 @@ func main() { lastTick := time.Now() for now := range ticker.C { CurrentTraffic = CalculateSiteTraffic(api, sites, now.Sub(lastTick)) - fmt.Println(CurrentTraffic) lastTick = now } }