aboutsummaryrefslogtreecommitdiff
path: root/internal/feed/item.go
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.eu>2021-10-29 01:31:10 +0200
committerRené 'Necoro' Neumann <necoro@necoro.eu>2021-10-29 01:31:10 +0200
commitf17f63bb944d886b552facf4b28a557b8e4a64d5 (patch)
tree9d85015ae0c5aa069c815f3a522662ade5be9a78 /internal/feed/item.go
parentce1e4c8465badcb49ea1b4fe8afd987587226614 (diff)
downloadfeed2imap-go-f17f63bb944d886b552facf4b28a557b8e4a64d5.tar.gz
feed2imap-go-f17f63bb944d886b552facf4b28a557b8e4a64d5.tar.bz2
feed2imap-go-f17f63bb944d886b552facf4b28a557b8e4a64d5.zip
#64: Set filename for included images
Diffstat (limited to '')
-rw-r--r--internal/feed/item.go5
1 files changed, 3 insertions, 2 deletions
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)
}