diff options
author | Evgeny Kuznetsov <evgeny@kuznetsov.md> | 2020-02-04 17:54:35 +0300 |
---|---|---|
committer | Evgeny Kuznetsov <evgeny@kuznetsov.md> | 2020-02-04 17:54:35 +0300 |
commit | dda2cae72b1dc9fb87959c7f31fa23d07a84ee37 (patch) | |
tree | 1514fa1c585b8c18ca584931f93cf78afedfbb88 /main.go | |
parent | 3e4bef162ed0d24ba2de3af82a4a3d6e489f33af (diff) | |
download | radiorus-rss-dda2cae72b1dc9fb87959c7f31fa23d07a84ee37.tar.gz radiorus-rss-dda2cae72b1dc9fb87959c7f31fa23d07a84ee37.zip |
remove loop
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 14 |
1 files changed, 4 insertions, 10 deletions
@@ -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 |