Added Console Output
All checks were successful
release-tag / release-image (push) Successful in 1m31s
All checks were successful
release-tag / release-image (push) Successful in 1m31s
This commit is contained in:
2
main.go
2
main.go
@@ -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)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user