Prefix rss items with date for temporal loading

This commit is contained in:
Bel LaPointe
2018-10-09 09:04:31 -06:00
parent c1cf329d57
commit 798d451103

View File

@@ -31,7 +31,7 @@ func (item *Item) String() string {
}
func (item *Item) ID() string {
return strings.Join(regexp.MustCompile("[a-zA-Z0-9]*").FindAllString(item.Link, -1), "_")
return item.TS.UTC().Format("20060102_") + strings.Join(regexp.MustCompile("[a-zA-Z0-9]*").FindAllString(item.Link, -1), "_")
}
func DeserializeItem(src []byte) (*Item, error) {