From f17f63bb944d886b552facf4b28a557b8e4a64d5 Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Fri, 29 Oct 2021 01:31:10 +0200 Subject: #64: Set filename for included images --- internal/feed/item.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'internal/feed/item.go') diff --git a/internal/feed/item.go b/internal/feed/item.go index f7dd506..b45f5c5 100644 --- a/internal/feed/item.go +++ b/internal/feed/item.go @@ -17,6 +17,7 @@ import ( type feedImage struct { image []byte mime string + name string } type Item struct { @@ -69,8 +70,8 @@ func (item *Item) AddReason(reason string) { } } -func (item *Item) addImage(img []byte, mime string) int { - i := feedImage{img, mime} +func (item *Item) addImage(img []byte, mime string, name string) int { + i := feedImage{img, mime, name} item.images = append(item.images, i) return len(item.images) } -- cgit v1.2.3-70-g09d2