Skip to content

Remove gorilla/context#190

Open
florianmouro wants to merge 1 commit intoCETEN-OpenBar:mainfrom
florianmouro:fix/remove-gorilla-context
Open

Remove gorilla/context#190
florianmouro wants to merge 1 commit intoCETEN-OpenBar:mainfrom
florianmouro:fix/remove-gorilla-context

Conversation

@florianmouro
Copy link
Copy Markdown

Summary

Remove useless call and associated useless dependency.

It appears that the Clear call only affects data set through gorillaContext.Set which we do not use. Indeed, that's the only call we make to gorilla/context and no dependencies seems to rely on it. (On top of that, its use is discouraged in favor of context.Context since go 1.7.).


Related issues :

  • None

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Documentation (update or create documentation)
  • CI/CD
  • Other
  • Breaking change (fix or feature that would cause existing functionality to change)

@florianmouro
Copy link
Copy Markdown
Author

For additional context, the call was mandatory 7 years ago to avoid memory leaks but is useless since sessions 1.2.0.
https://github.com/gorilla/sessions/releases/tag/v1.2.0
gorilla/sessions#175

Copy link
Copy Markdown
Member

@yyewolf yyewolf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Même chelou qu'il y avait du gorilla/context alors qu'on utilise pas gorilla/mux

Car même si le call était "utile" bah on utilise juste pas les features autre part donc bon

@florianmouro florianmouro force-pushed the fix/remove-gorilla-context branch from b40b5f9 to ee58fa0 Compare April 3, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants