From b41368462c89dbfc5230350c46629266f03ad9d5 Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Tue, 16 Feb 2021 19:24:33 +0100 Subject: Use go-embed for templates instead of inline strings. They should also use CRLF (cf issue #46). --- internal/feed/template/template.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'internal/feed/template/template.go') diff --git a/internal/feed/template/template.go b/internal/feed/template/template.go index d8eb850..09dacf1 100644 --- a/internal/feed/template/template.go +++ b/internal/feed/template/template.go @@ -15,6 +15,15 @@ type Template interface { Execute(wr io.Writer, data interface{}) error } +//go:embed html.tpl +var htmlTpl string + +//go:embed text.tpl +var textTpl string + +var Html = fromString("Feed", htmlTpl, true) +var Text = fromString("Feed", textTpl, false) + func must(t Template, err error) Template { if err != nil { panic(err) -- cgit v1.2.3-54-g00ecf From 2df7f561b6a4977051499731740aae2138c9d001 Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Thu, 18 Feb 2021 09:47:23 +0100 Subject: Import 'embed' package --- internal/feed/template/template.go | 1 + 1 file changed, 1 insertion(+) (limited to 'internal/feed/template/template.go') diff --git a/internal/feed/template/template.go b/internal/feed/template/template.go index 09dacf1..9804190 100644 --- a/internal/feed/template/template.go +++ b/internal/feed/template/template.go @@ -1,6 +1,7 @@ package template import ( + _ "embed" "fmt" html "html/template" "io" -- cgit v1.2.3-54-g00ecf 56&follow=1'>diff
Commit message (Expand)AuthorFilesLines
2020-04-11UpdateRené 'Necoro' Neumann1-0/+0
2020-04-05Replace git:// by https://René 'Necoro' Neumann1-2/+2
2020-02-17Update urxvt extension configRené 'Necoro' Neumann2-4/+120
2020-02-17Remove urxvt wgetpaste extensionRené 'Necoro' Neumann2-30/+1
2020-02-17[i3] Wifi: Include frequenceRené 'Necoro' Neumann1-1/+1
2020-02-17Put ssh-agent into the i3 environment.René 'Necoro' Neumann1-0/+1
2020-02-17Update cci: stgit now uses python3René 'Necoro' Neumann1-1/+1
2020-02-17Revert "Local Changes"René 'Necoro' Neumann2-5/+3
2020-02-17Update vundleRené 'Necoro' Neumann1-0/+0
2020-02-17Enable secondary screen in urxvtRené 'Necoro' Neumann1-0/+1
2020-02-17Local ChangesRené 'Necoro' Neumann2-3/+5
2018-06-10[i3] Replace icons by font awesomeRené 'Necoro' Neumann24-149/+13
2018-06-10[i3] Remove obsolete pidgin stuffRené 'Necoro' Neumann2-36/+0
2018-06-10[zsh] Remove obsolete isabelle functionsRené 'Necoro' Neumann2-112/+0
2018-06-10Misc changesRené 'Necoro' Neumann3-0/+7
2018-06-10[git] Update email addressRené 'Necoro' Neumann1-1/+1
2018-06-10Enhance cci scriptRené 'Necoro' Neumann1-15/+12
2017-11-18Some windows setupRené 'Necoro' Neumann2-1/+6
2017-10-08[zsh] Use zcalc instead of bcRené 'Necoro' Neumann1-5/+4
2017-10-08[zsh] CalculatorRené 'Necoro' Neumann1-0/+8
2017-10-08Some vim changes.René 'Necoro' Neumann4-28/+17
2017-10-08Delete old stuff.René 'Necoro' Neumann5-71/+1