aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/feed/cache_v1.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/internal/feed/cache_v1.go b/internal/feed/cache_v1.go
index d515528..157741f 100644
--- a/internal/feed/cache_v1.go
+++ b/internal/feed/cache_v1.go
@@ -2,6 +2,7 @@ package feed
import (
"crypto/sha256"
+ "encoding/hex"
"fmt"
"strconv"
"time"
@@ -40,6 +41,10 @@ type cachedFeed struct {
type itemHash [sha256.Size]byte
+func (h itemHash) String() string {
+ return hex.EncodeToString(h[:])
+}
+
type cachedItem struct {
Guid string
Title string
@@ -56,7 +61,8 @@ func (item cachedItem) String() string {
Guid: %q
Link: %q
Date: %s
-}`, item.Title, item.Guid, item.Link, util.TimeFormat(item.Date))
+ Hash: %s
+}`, item.Title, item.Guid, item.Link, util.TimeFormat(item.Date), item.Hash)
}
func (cf *cachedFeed) Checked(withFailure bool) {