remove feed_url references

This commit is contained in:
Nazar Kanaev 2021-03-22 16:16:34 +00:00
parent 19967ce37c
commit efafdbebaa
5 changed files with 0 additions and 6 deletions

View File

@ -67,7 +67,6 @@ func ParseAtom(r io.Reader) (*Feed, error) {
feed := &Feed{
Title: f.Title.String(),
SiteURL: first(f.Links.First("alternate"), f.Links.First("")),
FeedURL: f.Links.First("self"),
}
for _, e := range f.Entries {
date, _ := dateParse(first(e.Published, e.Updated))

View File

@ -38,7 +38,6 @@ func TestAtom(t *testing.T) {
want := &Feed{
Title: "Example Feed",
SiteURL: "http://example.org/",
FeedURL: "http://example.org/feed/",
Items: []Item{
{
GUID: "urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a",

View File

@ -10,7 +10,6 @@ type jsonFeed struct {
Version string `json:"version"`
Title string `json:"title"`
SiteURL string `json:"home_page_url"`
FeedURL string `json:"feed_url"`
Items []jsonItem `json:"items"`
}
@ -47,7 +46,6 @@ func (f *jsonFeed) convert() *Feed {
feed := &Feed{
Title: f.Title,
SiteURL: f.SiteURL,
FeedURL: f.FeedURL,
}
for _, item := range f.Items {
date, _ := dateParse(first(item.DatePublished, item.DateModified))

View File

@ -28,7 +28,6 @@ func TestJSONFeed(t *testing.T) {
want := &Feed{
Title: "My Example Feed",
SiteURL: "https://example.org/",
FeedURL: "https://example.org/feed.json",
Items: []Item{
{GUID: "2", Content: "This is a second item.", URL: "https://example.org/second-item"},
{GUID: "1", Content: "<p>Hello, world!</p>", URL: "https://example.org/initial-post"},

View File

@ -5,7 +5,6 @@ import "time"
type Feed struct {
Title string
SiteURL string
FeedURL string
Items []Item
}