diff options
author | René 'Necoro' Neumann <necoro@necoro.eu> | 2021-02-16 19:24:33 +0100 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.eu> | 2021-02-16 19:24:33 +0100 |
commit | b41368462c89dbfc5230350c46629266f03ad9d5 (patch) | |
tree | a3f2e0b0918c2b68ae29f9c5b235878b4494c644 /internal/feed/template/text.tpl | |
parent | 3a854c3bc47e75491b836c7fc12b617da5d68288 (diff) | |
download | feed2imap-go-b41368462c89dbfc5230350c46629266f03ad9d5.tar.gz feed2imap-go-b41368462c89dbfc5230350c46629266f03ad9d5.tar.bz2 feed2imap-go-b41368462c89dbfc5230350c46629266f03ad9d5.zip |
Use go-embed for templates instead of inline strings.
They should also use CRLF (cf issue #46).
Diffstat (limited to '')
-rw-r--r-- | internal/feed/template/text.tpl (renamed from internal/feed/template/text.tpl.go) | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/internal/feed/template/text.tpl.go b/internal/feed/template/text.tpl index 19aa9b2..57eef18 100644 --- a/internal/feed/template/text.tpl.go +++ b/internal/feed/template/text.tpl @@ -1,9 +1,4 @@ -package template - -var Text = fromString("Feed", textTpl, false) - -//noinspection HtmlDeprecatedAttribute,HtmlUnknownTarget -const textTpl = `{{- /*gotype:github.com/Necoro/feed2imap-go/internal/feed.feeditem*/ -}} +{{- /*gotype:github.com/Necoro/feed2imap-go/internal/feed.feeditem*/ -}} {{- with .Item.Link -}} <{{.}}> @@ -17,7 +12,7 @@ Files: {{ .URL}} ({{with .Length}}{{. | byteCount}}, {{end}}{{.Type}}) {{- end -}} {{- end}} --- +-- Feed: {{ with .Feed.Title -}}{{.}}{{- end }} {{ with .Feed.Link -}} <{{.}}> @@ -31,12 +26,12 @@ Item: {{ with .Item.Title -}} {{ with .Date -}} Date: {{.}} {{ end -}} -{{ with .Creator -}} +{{ with .Creator -}} Author: {{.}} {{ end -}} -{{ with (join ", " .Categories) -}} +{{ with (join ", " .Categories) -}} Filed under: {{.}} {{ end -}} {{ with .FeedLink -}} Feed-Link: {{.}} -{{ end -}}` +{{ end -}}
\ No newline at end of file |