small tweaks

This commit is contained in:
2024-01-19 17:43:40 -06:00
parent c1739856ce
commit 567cfe8083
6 changed files with 20 additions and 12795 deletions

View File

@@ -2,10 +2,12 @@ package cisa
import (
"encoding/json"
"net/http"
"sync"
"time"
"istheinternetonfire.app/internal/config"
"istheinternetonfire.app/internal/httpclient"
)
var (
@@ -22,16 +24,12 @@ func Read() CisaJSON {
func Start() {
for {
/*
c := httpclient.NewClient(http.DefaultClient)
d, err := c.Get(config.Cfg.RemoteURL)
if err != nil {
time.Sleep(time.Second * 120)
continue
}
*/
d := GetExampleData()
c := httpclient.NewClient(http.DefaultClient)
d, err := c.Get(config.Cfg.RemoteURL)
if err != nil {
time.Sleep(time.Second * 120)
continue
}
mu.Lock()
if err := json.Unmarshal(d, &Cisa); err != nil {

File diff suppressed because it is too large Load Diff