From 6341c675748f4807da984deffb597d21f693d558 Mon Sep 17 00:00:00 2001 From: nytpu Date: Wed, 17 Mar 2021 08:59:53 -0600 Subject: [PATCH] add (stubbed) updateGopherFeed function --- fetch/fetch.go | 4 +--- fetch/gopher.go | 6 ++++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/fetch/fetch.go b/fetch/fetch.go index 4bed64c..37d0b67 100644 --- a/fetch/fetch.go +++ b/fetch/fetch.go @@ -53,9 +53,7 @@ func UpdateFeed(f *core.Feed) error { // TODO fallthrough case "gopher", "gophers": - // return updateGopherFeed(f) - // TODO - fallthrough + return updateGopherFeed(f) default: return fmt.Errorf("Unsupported protocol '%s'", f.FeedLink.Scheme) } diff --git a/fetch/gopher.go b/fetch/gopher.go index 29afef1..d42d5eb 100644 --- a/fetch/gopher.go +++ b/fetch/gopher.go @@ -33,6 +33,12 @@ func newGopherFeed(remoteURL *url.URL, title string) (*core.Feed, error) { return nil, fmt.Errorf("Feeds served over gopher are currently unsupported.") } +// updateGopherFeed will check an existing core.Feed for updates +func updateGopherFeed(*core.Feed) error { + // TODO + return fmt.Errorf("Feeds served over gopher are currently unsupported.") +} + // newGopherPage will create a new core.Page given a gopher url func newGopherPage(remoteURL *url.URL, title string) (*core.Page, error) { var page core.Page