From 1525392a23c86214bf7ad1b5b7d8983f7b30837a Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Sat, 2 May 2020 21:40:02 +0200 Subject: 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. --- internal/feed/cache_v1.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'internal/feed/cache_v1.go') 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 { -- cgit v1.2.3-70-g09d2