add (stubbed) updateGopherFeed function

This commit is contained in:
nytpu
2021-03-17 08:59:53 -06:00
parent 795979e3bb
commit 6341c67574
2 changed files with 7 additions and 3 deletions
+1 -3
View File
@@ -53,9 +53,7 @@ func UpdateFeed(f *core.Feed) error {
// TODO // TODO
fallthrough fallthrough
case "gopher", "gophers": case "gopher", "gophers":
// return updateGopherFeed(f) return updateGopherFeed(f)
// TODO
fallthrough
default: default:
return fmt.Errorf("Unsupported protocol '%s'", f.FeedLink.Scheme) return fmt.Errorf("Unsupported protocol '%s'", f.FeedLink.Scheme)
} }
+6
View File
@@ -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.") 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 // newGopherPage will create a new core.Page given a gopher url
func newGopherPage(remoteURL *url.URL, title string) (*core.Page, error) { func newGopherPage(remoteURL *url.URL, title string) (*core.Page, error) {
var page core.Page var page core.Page