{"id":21851933,"url":"https://github.com/ulbora/go-better-sessions","last_synced_at":"2025-10-12T15:10:24.379Z","repository":{"id":87394552,"uuid":"100127830","full_name":"Ulbora/go-better-sessions","owner":"Ulbora","description":"A wrapper for gorilla sessions","archived":false,"fork":false,"pushed_at":"2017-10-17T01:53:25.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-21T18:33:12.547Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ulbora.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-12T17:33:19.000Z","updated_at":"2017-08-12T17:35:46.000Z","dependencies_parsed_at":"2023-05-07T11:30:45.588Z","dependency_job_id":null,"html_url":"https://github.com/Ulbora/go-better-sessions","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Ulbora/go-better-sessions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ulbora%2Fgo-better-sessions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ulbora%2Fgo-better-sessions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ulbora%2Fgo-better-sessions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ulbora%2Fgo-better-sessions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ulbora","download_url":"https://codeload.github.com/Ulbora/go-better-sessions/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ulbora%2Fgo-better-sessions/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266851389,"owners_count":23995267,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-28T01:12:29.551Z","updated_at":"2025-10-12T15:10:24.300Z","avatar_url":"https://github.com/Ulbora.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"go-better-sessions \n==============\n\nGo wrapper for gorilla sessions\nhttp://www.gorillatoolkit.org/pkg/sessions\n\n# Installation\n\n```\n$ go get github.com/gorilla/sessions\n$ go get github.com/Ulbora/go-better-sessions\n\n```\n\n# Usage\n\n## Initialize and use\n```\n    import usess github.com/Ulbora/go-better-sessions\n    var s usess.Session\n    func main() {\n\t    s.MaxAge = 5 * 60\n\t    s.Name = \"user-session-test\"\n\t    s.SessionKey = \"554dfgdffdd11dfgf1ff1f\"\n    }\n\n    func handleSomething(res http.ResponseWriter, req *http.Request) {\n\t    s.InitSessionStore(res, req)\n        session, err := s.GetSession(req)\n\t    if err != nil {\n\t\t    http.Error(res, err.Error(), http.StatusInternalServerError)\n\t    }\n\t    user := session.Values[\"username\"]\n\n        session.Values[\"someVal\"] = \"someValue\"\n        session.Values[\"someOtherVal\"] = 55\n        //do something\n    }\n```\n\n# Important Note:\nIf you aren't using gorilla/mux, you need to wrap your handlers with context.ClearHandler as or else you will leak memory! An easy way to do this is to wrap the top-level mux when calling http.ListenAndServe:","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fulbora%2Fgo-better-sessions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fulbora%2Fgo-better-sessions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fulbora%2Fgo-better-sessions/lists"}