utron
utron copied to clipboard
Does (*context.Context) GetSession return new session intentionally?
I found the code below in session.go and
I wonder this because gorilla/sessions has a method
(Store) Get
to retrieve a session with a given name.
//GetSession retrieves session with a given name.
func (ctx *Context) GetSession(name string) (*sessions.Session, error) {
if ctx.SessionStore != nil {
return ctx.SessionStore.New(ctx.Request(), name)
}
return nil, errNoStore
}