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
|
||||
}
|
||||
|
||||
AddFeed(newURL, feed)
|
||||
if url != newURL {
|
||||
err = AddFeed(newURL, feed)
|
||||
if url != newURL && err == nil {
|
||||
// URL has changed, remove old one
|
||||
Remove(url)
|
||||
Remove(url) //nolint:errcheck
|
||||
}
|
||||
}
|
||||
|
||||
@ -354,10 +354,10 @@ func updatePage(url string) {
|
||||
return
|
||||
}
|
||||
|
||||
AddPage(newURL, res.Body)
|
||||
if url != newURL {
|
||||
err = AddPage(newURL, res.Body)
|
||||
if url != newURL && err == nil {
|
||||
// URL has changed, remove old one
|
||||
Remove(url)
|
||||
Remove(url) //nolint:errcheck
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user