diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2023-04-19 12:17:27 +0200 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2023-04-19 12:17:27 +0200 |
commit | ddb1ca205abb6349b59bc5ea7764a68484e72338 (patch) | |
tree | 84db9ac2260ad87b04bca10ba6a90ecb1b4b83b3 /main.go | |
parent | bdb9af5a26f49799cb1feec866d289513eb09e7b (diff) | |
download | guichet-ddb1ca205abb6349b59bc5ea7764a68484e72338.tar.gz guichet-ddb1ca205abb6349b59bc5ea7764a68484e72338.zip |
bind website page
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -105,7 +105,12 @@ func readConfig() ConfigFile { } func getTemplate(name string) *template.Template { - return template.Must(template.ParseFiles(templatePath+"/layout.html", templatePath+"/"+name)) + return template.Must(template.New("layout.html").Funcs(template.FuncMap { + "contains": strings.Contains, + }).ParseFiles( + templatePath+"/layout.html", + templatePath+"/"+name, + )) } func main() { |