aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Kuznetsov <evgeny@kuznetsov.md>2020-02-04 17:54:35 +0300
committerEvgeny Kuznetsov <evgeny@kuznetsov.md>2020-02-04 17:54:35 +0300
commitdda2cae72b1dc9fb87959c7f31fa23d07a84ee37 (patch)
tree1514fa1c585b8c18ca584931f93cf78afedfbb88
parent3e4bef162ed0d24ba2de3af82a4a3d6e489f33af (diff)
downloadradiorus-rss-dda2cae72b1dc9fb87959c7f31fa23d07a84ee37.tar.gz
radiorus-rss-dda2cae72b1dc9fb87959c7f31fa23d07a84ee37.zip
remove loop
-rw-r--r--main.go14
1 files changed, 4 insertions, 10 deletions
diff --git a/main.go b/main.go
index d284b20..7687793 100644
--- a/main.go
+++ b/main.go
@@ -102,16 +102,10 @@ func getFeed(url string) (feed *feeds.Feed) {
Link: &feeds.Link{Href: url},
}
- for {
- page := getPage(url)
- if err := populateFeed(feed, page); err == errBadEpisode {
- time.Sleep(15 * 60 * time.Second)
- continue
- } else if err != nil {
- err = fmt.Errorf("could not process %v: %w", url, err)
- log.Fatal(err)
- }
- break
+ page := getPage(url)
+ if err := populateFeed(feed, page); err != nil {
+ err = fmt.Errorf("could not process %v: %w", url, err)
+ log.Fatal(err)
}
return feed