From 1f9fe0b169c1cf458049b85d7fcee4236f06e5d9 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 10 Jun 2020 22:46:42 +0200 Subject: Workaround template functions not loaded This is a hacky workaround to make things work until we find a better solution. Closes: https://todo.sr.ht/~emersion/alps/96 --- plugins/caldav/plugin.go | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'plugins/caldav') diff --git a/plugins/caldav/plugin.go b/plugins/caldav/plugin.go index e8d14a9..03f8214 100644 --- a/plugins/caldav/plugin.go +++ b/plugins/caldav/plugin.go @@ -2,10 +2,8 @@ package alpscaldav import ( "fmt" - "html/template" "net/http" "net/url" - "time" "git.sr.ht/~emersion/alps" ) @@ -64,21 +62,6 @@ func newPlugin(srv *alps.Server) (alps.Plugin, error) { registerRoutes(&p, u) - p.TemplateFuncs(template.FuncMap{ - "formatinputdate": func(t time.Time) string { - if t.IsZero() { - return "" - } - return t.Format(inputDateLayout) - }, - "formatinputtime": func(t time.Time) string { - if t.IsZero() { - return "" - } - return t.Format(inputTimeLayout) - }, - }) - return p.Plugin(), nil } -- cgit v1.2.3