From bffc67d764221fa9c1ad3ad65702b3a157bb2d79 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Dec 2023 11:45:33 +0100 Subject: [chore]: Bump github.com/gorilla/feeds from 1.1.1 to 1.1.2 (#2414) Bumps [github.com/gorilla/feeds](https://github.com/gorilla/feeds) from 1.1.1 to 1.1.2. - [Release notes](https://github.com/gorilla/feeds/releases) - [Commits](https://github.com/gorilla/feeds/compare/v1.1.1...v1.1.2) --- updated-dependencies: - dependency-name: github.com/gorilla/feeds dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- vendor/github.com/gorilla/feeds/rss.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'vendor/github.com/gorilla/feeds/rss.go') diff --git a/vendor/github.com/gorilla/feeds/rss.go b/vendor/github.com/gorilla/feeds/rss.go index 09179dfb2..8c227a8b7 100644 --- a/vendor/github.com/gorilla/feeds/rss.go +++ b/vendor/github.com/gorilla/feeds/rss.go @@ -95,11 +95,13 @@ type Rss struct { func newRssItem(i *Item) *RssItem { item := &RssItem{ Title: i.Title, - Link: i.Link.Href, Description: i.Description, Guid: i.Id, PubDate: anyTimeFormat(time.RFC1123Z, i.Created, i.Updated), } + if i.Link != nil { + item.Link = i.Link.Href + } if len(i.Content) > 0 { item.Content = &RssContent{Content: i.Content} } @@ -135,9 +137,13 @@ func (r *Rss) RssFeed() *RssFeed { image = &RssImage{Url: r.Image.Url, Title: r.Image.Title, Link: r.Image.Link, Width: r.Image.Width, Height: r.Image.Height} } + var href string + if r.Link != nil { + href = r.Link.Href + } channel := &RssFeed{ Title: r.Title, - Link: r.Link.Href, + Link: href, Description: r.Description, ManagingEditor: author, PubDate: pub, -- cgit v1.2.3