Closed josephspurrier closed 7 years ago
Just checked Gorilla sessions, it still uses gorilla/context because it will require a breaking change: https://github.com/gorilla/sessions/issues/80. Will check back in a few weeks.
@josephspurrier any updates here? Thanks
@artemgrygor No, still waiting on Gorilla. Their issue is still open.
No problem, Sir. So what do you suggest should we still use gorilla context or start integrate the http context to the app? Not sure that I want to have both in one app.
I just had to research to figure out the difference between these packages. Gorilla context and gorilla sessions serve two different purposes. Context is only supposed to be used for the short lifetime of a single page request which is why you are supposed to clear using middleware at the end of the request. Sessions is for the lifetime of the cookie so basically multiple page requests. If you don't use gorilla sessions, you will need to use a different package or write your own that saves the session into a cookie or back-end storage.
@josephspurrier thanks, now it's more clear. Using gorilla one then.
Since it will be in Go 1.7, it would be nice to eliminate dependencies and go back to the http/net package with the net/context package.