Fix lint issues

Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
Émile Ré
2026-06-11 14:53:06 +02:00
parent 229c6b99c6
commit b36bbf9992
5 changed files with 12 additions and 0 deletions

View File

@@ -50,6 +50,7 @@ func Parse(ctx context.Context, client *http.Client, websiteURL string) (*PageIn
if err != nil {
return nil, fmt.Errorf("cannot fetch page: %w", err)
}
defer func() { _ = resp.Body.Close() }()
if resp.StatusCode != http.StatusOK {
@@ -57,6 +58,7 @@ func Parse(ctx context.Context, client *http.Client, websiteURL string) (*PageIn
}
const maxHTMLSize = 10 << 20 // 10 MiB
return ParseHTML(parsed, io.LimitReader(resp.Body, maxHTMLSize))
}