R
R
Roman Rakzin2015-07-15 22:45:55
go
Roman Rakzin, 2015-07-15 22:45:55

how to delete session in golang

I use "github.com/gorilla/sessions" - www.gorillatoolkit.org/pkg/sessions
I create a session - everything is fine.
But just how to remove it?
There it is added to the list of sessions, but you need to remove the session itself from the list of sessions, so as not to litter the memory
How to do this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Rakzin, 2015-07-16
@TwoRS

Figured out
session.Options.MaxAge = 0
session.Save(r, w)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question