func init() { _ = render.RegisterTemplateFunction("markdown", markdown.Markdown) _ = render.RegisterTemplateFunction("ext", ext) cookieStore.Options = &sessions.Options{ Domain: "localhost", Path: "/", MaxAge: 3600 * 8, // 8 hours HttpOnly: true, } }
func init() { _ = render.RegisterTemplateFunction("isAuthenticated", IsAuthenticated) _ = render.RegisterTemplateFunction("authenticatedUser", GetAuthenticatedUser) _ = render.RegisterTemplateFunction("authenticatedUserKey", GetAuthenticatedUserKey) _ = render.RegisterTemplateFunction("user", GetUser) }