From dda2cae72b1dc9fb87959c7f31fa23d07a84ee37 Mon Sep 17 00:00:00 2001 From: Evgeny Kuznetsov Date: Tue, 4 Feb 2020 17:54:35 +0300 Subject: remove loop --- main.go | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'main.go') 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 -- cgit v1.2.3