package web import ( "net/http" "github.com/alexedwards/scs" "bitmask.me/skeleton/internal/app" ) type Handlers struct { *app.App session *scs.Session } func NewHandlers(app *app.App) *Handlers { h := &Handlers{App: app} h.session = scs.NewSession() h.session.Cookie.Persist = false h.session.Cookie.Secure = false return h } func (h *Handlers) Session() *scs.Session { return h.session } func (h *Handlers) LandingPageHandler(w http.ResponseWriter, r *http.Request) { h.Templates().Get("landing.tmpl").Execute(w, nil) }