func GetSession(r *http.Request, session_name string) (*sessions.Session, error) {
	s, err := M.Store.Get(r, session_name)
	if s.ID == "" {
		k := securecookie.GenerateRandomKey(24)
		s.ID = fmt.Sprintf("%x", k)
	}
	return s, err
}
GetSession returns a session
package mod_sessions
import (
	"os"
	"fmt"
	"net/http"
	"github.com/scyth/go-webproject/gwp/gwp_context"
	"github.com/scyth/go-webproject/gwp/gwp_module"
	"github.com/scyth/go-webproject/gwp/libs/gorilla/sessions"
	"github.com/scyth/go-webproject/gwp/libs/gorilla/securecookie"
)
var myname = "mod_sessions"
var myparams = &gwp_context.ModParams{
        &gwp_context.ModParam{Name: "secret-key", Value: "", Default: "", Type: gwp_context.TypeStr, Must: true},
	&gwp_context.ModParam{Name: "encryption-key", Value: "", Default: "", Type: gwp_context.TypeStr, Must: false},
}
var M *ModSessions
func LoadModule() gwp_module.Module {
	M = new(ModSessions)
	M.Store = new(sessions.FilesystemStore)
	return M
}
type ModSessions struct {
	ModCtx *gwp_module.ModContext
	Store *sessions.FilesystemStore
}
func (ms *ModSessions) ModInit(modCtx *gwp_module.ModContext, err error) {
	if err != nil {
		fmt.Println("Error initializing module:", myname, "-", err.Error())
		os.Exit(1)
	}
	ms.ModCtx = modCtx
}
func (ms *ModSessions) GetParams() *gwp_context.ModParams {
        return myparams
}
func (ms *ModSessions) SaveParams(params gwp_context.ModParams) {
	ms.ModCtx.Params = &params
}
func (ms *ModSessions) GetName() string {
	return myname
}
func ReadParamStr(name string) string {
	for _,v := range *M.ModCtx.Params {
		if v.Name == name {
			return v.Value.(string)
		}
	}
	return ""
}
func RegisterStore(keyPairs ...[]byte) {
	store := sessions.NewFilesystemStore("", keyPairs...)
	M.Store = store
}