Simple easy Session System
go get github.com/pastebt/sess
You have to init the session system when your server start, give the path where to save persistent data for your session.
import "github.com/pastebt/sess"
sess.Init("/path/to/save/data/")
If set path as "", session will keep in memory and will be lost when server stop.
In a net/http handler function, you can use it like this:
func handler(w ResponseWriter, r *Request) {
s := sess.Start(w, r)
name := s.Get("username")
s.Set("password", "whateveryourpassword")
...
}