diff --git a/internal/feeder/rfc6962/rfc6962_feeder.go b/internal/feeder/rfc6962/rfc6962_feeder.go index e388aa3..1cd848e 100644 --- a/internal/feeder/rfc6962/rfc6962_feeder.go +++ b/internal/feeder/rfc6962/rfc6962_feeder.go @@ -111,7 +111,6 @@ func getJSON(ctx context.Context, c *http.Client, base *url.URL, path string, s return fmt.Errorf("failed to get: %v", err) } if err := json.Unmarshal(raw, s); err != nil { - klog.Infof("Got body:\n%s", string(raw)) return fmt.Errorf("failed to unmarshal JSON: %v", err) } return nil @@ -133,7 +132,11 @@ func get(ctx context.Context, c *http.Client, base *url.URL, path string) ([]byt if err != nil { return nil, fmt.Errorf("failed to make request to %q: %v", u.String(), err) } - defer rsp.Body.Close() + defer func() { + if err := rsp.Body.Close(); err != nil { + klog.Infof("Close: %v", err) + } + }() if rsp.StatusCode == 404 { return nil, os.ErrNotExist