mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
15 lines
318 B
Go
15 lines
318 B
Go
|
package config
|
||
|
|
||
|
import "github.com/gorilla/sessions"
|
||
|
|
||
|
// sessions are only used for displaying flash messages
|
||
|
|
||
|
var sessionStore *sessions.CookieStore
|
||
|
|
||
|
func GetSessionStore() *sessions.CookieStore {
|
||
|
if sessionStore == nil {
|
||
|
sessionStore = sessions.NewCookieStore(Get().Security.SessionKey)
|
||
|
}
|
||
|
return sessionStore
|
||
|
}
|