Added Console Output
All checks were successful
release-tag / release-image (push) Successful in 1m31s

This commit is contained in:
2025-06-09 22:16:57 +02:00
parent d528fff0e9
commit eee9783562

View File

@@ -181,6 +181,7 @@ func syncOnce(ctx context.Context, cfg Config, rdb *redis.Client, ranger *Ranger
}
func processURL(ctx context.Context, url string, cb func(netip.Prefix)) error {
fmt.Println("Process URL:", url)
req, _ := http.NewRequestWithContext(ctx, http.MethodGet, url, nil)
resp, err := http.DefaultClient.Do(req)
if err != nil {
@@ -190,6 +191,7 @@ func processURL(ctx context.Context, url string, cb func(netip.Prefix)) error {
if resp.StatusCode != http.StatusOK {
return fmt.Errorf("%s -> %s", url, resp.Status)
}
fmt.Println("Done.")
return parseStream(resp.Body, cb)
}