aboutsummaryrefslogtreecommitdiff
path: root/internal/feed/cache_v1.go
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.eu>2020-05-02 21:40:02 +0200
committerRené 'Necoro' Neumann <necoro@necoro.eu>2020-05-02 21:40:02 +0200
commit1525392a23c86214bf7ad1b5b7d8983f7b30837a (patch)
tree1515a12a24f682131672acfe3be6c0d17ba9c19b /internal/feed/cache_v1.go
parent6bd8a6c2cd153bad9ca044b409e55302e10206c1 (diff)
downloadfeed2imap-go-1525392a23c86214bf7ad1b5b7d8983f7b30837a.tar.gz
feed2imap-go-1525392a23c86214bf7ad1b5b7d8983f7b30837a.tar.bz2
feed2imap-go-1525392a23c86214bf7ad1b5b7d8983f7b30837a.zip
Use uuid library directly and encode to base64.
Also add an additional header `X-Feed2Imap-Item`, b/c the messageId contains the variable part of the hostname.
Diffstat (limited to 'internal/feed/cache_v1.go')
-rw-r--r--internal/feed/cache_v1.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/internal/feed/cache_v1.go b/internal/feed/cache_v1.go
index 9a6de50..e2562c3 100644
--- a/internal/feed/cache_v1.go
+++ b/internal/feed/cache_v1.go
@@ -6,6 +6,8 @@ import (
"strconv"
"time"
+ "github.com/google/uuid"
+
"github.com/Necoro/feed2imap-go/pkg/log"
"github.com/Necoro/feed2imap-go/pkg/util"
)
@@ -46,7 +48,7 @@ type cachedItem struct {
UpdatedDate time.Time
UpdatedCache time.Time
Hash itemHash
- ID string
+ ID uuid.UUID
}
func (item cachedItem) String() string {