20 lines
287 B
Go
20 lines
287 B
Go
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
|
|
}
|