From e1ba1b8277bd912654f6c702609c5a94bfc42ea8 Mon Sep 17 00:00:00 2001 From: Jason Streifling Date: Tue, 15 Oct 2024 17:39:17 +0200 Subject: [PATCH] Update updated of feed when adding an object --- feed.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/feed.go b/feed.go index b911e27..956a750 100644 --- a/feed.go +++ b/feed.go @@ -48,6 +48,8 @@ func (f *Feed) AddAuthor(p *Person) { } else { f.Authors = append(f.Authors, p) } + + f.Updated.DateTime = DateTime(time.Now()) } // AddCategory adds the category to the feed. @@ -58,6 +60,8 @@ func (f *Feed) AddCategory(c *Category) { } else { f.Categories = append(f.Categories, c) } + + f.Updated.DateTime = DateTime(time.Now()) } // AddContributor adds the contributor to the feed. @@ -68,6 +72,8 @@ func (f *Feed) AddContributor(c *Person) { } else { f.Contributors = append(f.Contributors, c) } + + f.Updated.DateTime = DateTime(time.Now()) } // AddLink adds the link to the feed. @@ -79,6 +85,8 @@ func (f *Feed) AddLink(l *Link) { } else { f.Links = append(f.Links, l) } + + f.Updated.DateTime = DateTime(time.Now()) } // AddExtension adds the extension to the feed. @@ -89,6 +97,8 @@ func (f *Feed) AddExtension(e *ExtensionElement) { } else { f.Extensions = append(f.Extensions, e) } + + f.Updated.DateTime = DateTime(time.Now()) } // AddEntry adds the entry to the feed. @@ -99,6 +109,8 @@ func (f *Feed) AddEntry(e *Entry) { } else { f.Entries = append(f.Entries, e) } + + f.Updated.DateTime = DateTime(time.Now()) } // Check checks the feed for incompatibilities with RFC4287.