-
-
Notifications
You must be signed in to change notification settings - Fork 3
cookie.Manager and DefaultManager #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 5 +4
Lines 146 189 +43
=========================================
+ Hits 146 189 +43 ☔ View full report in Codecov by Sentry. |
I appreciate you consider this rewriting |
@ccoVeille We'll see how the experiment goes, but I'm certainly willing to entertain it for now. I've finished my initial pass of just the Cookie Would love any feedback from the first pass. |
It seems to me that providing the I'll leave this open for feedback while I sleep and check back in, and maybe we can get this merged in if I don't come up with any reasons not to between now and then. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small remark about README, except that 👍
Uh oh!
There was an error while loading.
Based on some changes in the latest version, as well as some optimizations I think we're able to do to the package overall, this changeset contains the following major changes:
cookie.Manager
is now the primary API to the packagecookie.DefaultManager
is initialized and provides API stability for the globalSet/Get/...
methods.cookie.NewManager(cookie.WithSigningKey(signingKey))
CustomTypeHandler
so we no longer impose a specific dependency (gofrs/uuid)PopulateFromCookies
functionalityDefaultOptions
- ThemergeOptions
functionality wasn't working well anyways.omitempty
to silently ignore missing cookies.While I hope this introduces the least amount of API breakage as possible, I hope the new API will be significantly more stable than the previous iterations and this can be the foundation for moving forward.