aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorMitchell Riedstra <mitch@riedstra.dev>2022-12-07 11:29:15 -0500
committerMitchell Riedstra <mitch@riedstra.dev>2022-12-07 11:29:15 -0500
commit69a3d0123be4c645d5318b5e9d0a5e68f6324b58 (patch)
treebb45de12a811b2f9aa135c7d7af825754291c259 /cmd
parent10c60b3c9ba2c17419534cf4089328a66568e4f1 (diff)
downloadgo-website-0.0.20.tar.gz
go-website-0.0.20.tar.xz
Add basic string functions to default template funcmap. Set a var when page is being rendered markdown only.v0.0.20
Diffstat (limited to 'cmd')
-rw-r--r--cmd/server/main.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/cmd/server/main.go b/cmd/server/main.go
index ee8cf6f..29cffbf 100644
--- a/cmd/server/main.go
+++ b/cmd/server/main.go
@@ -7,7 +7,6 @@ import (
"net/http"
"os"
"strings"
- "text/template"
"time"
"github.com/gomodule/redigo/redis"
@@ -101,9 +100,7 @@ func main() { //nolint:funlen
os.Stderr.Write(b)
}
- page.Funcs = template.FuncMap{
- "ClearRedis": app.ClearRedis,
- }
+ page.Funcs["ClearRedis"] = app.ClearRedis
srv := &http.Server{
Handler: app,