Update updated of feed when adding an object
This commit is contained in:
parent
8863e97f1f
commit
e1ba1b8277
12
feed.go
12
feed.go
@ -48,6 +48,8 @@ func (f *Feed) AddAuthor(p *Person) {
|
|||||||
} else {
|
} else {
|
||||||
f.Authors = append(f.Authors, p)
|
f.Authors = append(f.Authors, p)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
f.Updated.DateTime = DateTime(time.Now())
|
||||||
}
|
}
|
||||||
|
|
||||||
// AddCategory adds the category to the feed.
|
// AddCategory adds the category to the feed.
|
||||||
@ -58,6 +60,8 @@ func (f *Feed) AddCategory(c *Category) {
|
|||||||
} else {
|
} else {
|
||||||
f.Categories = append(f.Categories, c)
|
f.Categories = append(f.Categories, c)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
f.Updated.DateTime = DateTime(time.Now())
|
||||||
}
|
}
|
||||||
|
|
||||||
// AddContributor adds the contributor to the feed.
|
// AddContributor adds the contributor to the feed.
|
||||||
@ -68,6 +72,8 @@ func (f *Feed) AddContributor(c *Person) {
|
|||||||
} else {
|
} else {
|
||||||
f.Contributors = append(f.Contributors, c)
|
f.Contributors = append(f.Contributors, c)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
f.Updated.DateTime = DateTime(time.Now())
|
||||||
}
|
}
|
||||||
|
|
||||||
// AddLink adds the link to the feed.
|
// AddLink adds the link to the feed.
|
||||||
@ -79,6 +85,8 @@ func (f *Feed) AddLink(l *Link) {
|
|||||||
} else {
|
} else {
|
||||||
f.Links = append(f.Links, l)
|
f.Links = append(f.Links, l)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
f.Updated.DateTime = DateTime(time.Now())
|
||||||
}
|
}
|
||||||
|
|
||||||
// AddExtension adds the extension to the feed.
|
// AddExtension adds the extension to the feed.
|
||||||
@ -89,6 +97,8 @@ func (f *Feed) AddExtension(e *ExtensionElement) {
|
|||||||
} else {
|
} else {
|
||||||
f.Extensions = append(f.Extensions, e)
|
f.Extensions = append(f.Extensions, e)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
f.Updated.DateTime = DateTime(time.Now())
|
||||||
}
|
}
|
||||||
|
|
||||||
// AddEntry adds the entry to the feed.
|
// AddEntry adds the entry to the feed.
|
||||||
@ -99,6 +109,8 @@ func (f *Feed) AddEntry(e *Entry) {
|
|||||||
} else {
|
} else {
|
||||||
f.Entries = append(f.Entries, e)
|
f.Entries = append(f.Entries, e)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
f.Updated.DateTime = DateTime(time.Now())
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check checks the feed for incompatibilities with RFC4287.
|
// Check checks the feed for incompatibilities with RFC4287.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user