commit b55d622b1e6f2f64b623a57663efb1c119a350ed
parent fe3193a389126a31c474bf0a8c445f18edbcc3a0
Author: Emile 'iMil' Heitor <imil@NetBSD.org>
Date: Sat, 15 Jul 2023 09:54:46 +0200
feat: add date
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/main.go b/main.go
@@ -21,6 +21,7 @@ type News struct {
Origin string `json:"origin"`
Title string `json:"title"`
Link string `json:"link"`
+ Date string `json:"date"`
Hash string `json:"hash"`
}
@@ -121,6 +122,7 @@ func newsFetch(client *girc.Client, channel string) {
Origin: feed.Title,
Title: item.Title,
Link: item.Link,
+ Date: item.PublishedParsed.String(),
Hash: mkHash(item.Title, item.Link),
}
// Check if item was already posted