Skip to content

Package session is a middleware that provides the session management for Flamego

License

Notifications You must be signed in to change notification settings

flamego/session

Repository files navigation

session

GitHub Workflow StatusGoDoc

Package session is a middleware that provides the session management for Flamego.

Installation

go get github.com/flamego/session

Getting started

package main import ( "github.com/flamego/flamego""github.com/flamego/session" ) funcmain(){f:=flamego.Classic() f.Use(session.Sessioner()) f.Get("/", func(s session.Session){s.Set("user_id", 123) userID, ok:=s.Get("user_id").(int) // ... }) f.Run() }

Getting help

License

This project is under the MIT License. See the LICENSE file for the full license text.

About

Package session is a middleware that provides the session management for Flamego

Topics

Resources

License

Stars

Watchers

Forks

Contributors 7

Languages