diff options
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -36,7 +36,10 @@ func New() *App { blockKey, err := hex.DecodeString(config.HashKey) s := securecookie.New(hashKey, blockKey) app.CookieHandler = s - templates := template.Must(template.ParseGlob("templates/*.tmpl")) + fmap := template.FuncMap{ + "ago": ago, + } + templates := template.Must(template.New("").Funcs(fmap).ParseGlob("templates/*.tmpl")) app.Template = templates return app } @@ -51,6 +54,7 @@ func logg(fn http.HandlerFunc) http.HandlerFunc { } func main() { + log.SetFlags(log.LstdFlags | log.Lshortfile) app := New() go func() { |
