mirror of
https://github.com/makew0rld/amfora.git
synced 2025-01-03 14:56:27 -05:00
🚨 Use err from AddPage
This commit is contained in:
parent
008d713de3
commit
bd7bb5f9f0
@ -341,10 +341,10 @@ func updateFeed(url string) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
AddFeed(newURL, feed)
|
err = AddFeed(newURL, feed)
|
||||||
if url != newURL {
|
if url != newURL && err == nil {
|
||||||
// URL has changed, remove old one
|
// URL has changed, remove old one
|
||||||
Remove(url)
|
Remove(url) //nolint:errcheck
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -354,10 +354,10 @@ func updatePage(url string) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
AddPage(newURL, res.Body)
|
err = AddPage(newURL, res.Body)
|
||||||
if url != newURL {
|
if url != newURL && err == nil {
|
||||||
// URL has changed, remove old one
|
// URL has changed, remove old one
|
||||||
Remove(url)
|
Remove(url) //nolint:errcheck
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user