Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.

Does (*context.Context) GetSession return new session intentionally? #102

Open
tomocy opened this issue Oct 19, 2018 · 0 comments
Open

Does (*context.Context) GetSession return new session intentionally? #102

tomocy opened this issue Oct 19, 2018 · 0 comments

Comments

@tomocy
Copy link
Contributor

tomocy commented Oct 19, 2018

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
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant