diff options
author | tjpcc <tjp@ctrl-c.club> | 2023-09-23 13:10:27 -0600 |
---|---|---|
committer | tjpcc <tjp@ctrl-c.club> | 2023-09-23 13:10:27 -0600 |
commit | 32f84de36c9da1da47b718cb942afa36d1b23922 (patch) | |
tree | b2b57235f867ab33279a3f7d9987501461360681 /templates.go | |
parent | d59ed1060d354ce911da1e7fb19f651feeafa2c1 (diff) |
use .gmi, .gmi.txt, .gph, .gph.txt everywhere for templates
Diffstat (limited to 'templates.go')
-rw-r--r-- | templates.go | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/templates.go b/templates.go index ff45997..c90cb09 100644 --- a/templates.go +++ b/templates.go @@ -9,13 +9,17 @@ import ( ) var ( - //go:embed templates/*.gmi + //go:embed templates/*.gmi templates/*.gmi.txt geminiTemplateFS embed.FS - geminiTemplate = template.Must(template.ParseFS(geminiTemplateFS, "templates/*.gmi")) + geminiTemplate = template.Must(template.ParseFS( + geminiTemplateFS, + "templates/*.gmi", + "templates/*.gmi.txt", + )) ) var ( - //go:embed templates/*.gophermap templates/*.gophertext + //go:embed templates/*.gph templates/*.gph.txt gopherTemplateFS embed.FS gopherTemplate = template.Must( template.New("gopher").Funcs(template.FuncMap{ @@ -24,8 +28,8 @@ var ( "rawtext": gopherRawtext, }).ParseFS( gopherTemplateFS, - "templates/*.gophermap", - "templates/*.gophertext", + "templates/*.gph", + "templates/*.gph.txt", ), ) ) |