x/auth/session.go

20 lines
287 B
Go
Raw Normal View History

package auth
import (
"encoding/gob"
"github.com/gorilla/sessions"
)
var (
Store *sessions.FilesystemStore
)
func Init() error {
Store = sessions.NewFilesystemStore("", []byte("something-very-secret"))
gob.Register(map[string]interface{}{})
gob.Register(User{})
return nil
}