fix tests

This commit is contained in:
2026-10-12 21:23:28 +02:00
parent 4e77573223
commit 7f2f61ca9e
2 changed files with 24 additions and 15 deletions

View File

@@ -55,6 +55,9 @@ func ScrapeUser(conf *Config) error {
body, err := fetch.Get(uri)
defer func() {
if body == nil {
return
}
// make sure body is completely flushed
if _, err := io.Copy(io.Discard, body); err != nil {
panic(err)
@@ -132,6 +135,10 @@ func ScrapeAd(conf *Config, uri string) error {
body, err := fetch.Get(uri)
defer func() {
if body == nil {
return
}
// make sure body is completely flushed
if _, err := io.Copy(io.Discard, body); err != nil {
panic(err)