mirror of
https://codeberg.org/scip/kleingebaeck.git
synced 2026-11-22 22:48:59 +01:00
fix tests
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user