Skip to content

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

Stars

11 stars

Watchers

3 watching

Forks

Releases

Used by

Contributors

Languages