Skip to content
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

Cleanup: Migrate from ctxutil to option structs where feasible #1798

Closed
dominikschulz opened this issue Feb 14, 2021 · 1 comment
Closed
Assignees
Labels
cleanup Code hygiene
Milestone

Comments

@dominikschulz
Copy link
Member

The ctxutil package was introduced to clean up the signatures and make it (much) easier to channel through UI specific settings and callbacks to the place where they are needed. However effective this approach is, it's something of an anti-pattern and most APIs use some kind of optional option structs (e.g. func (s* Store) Get(key string, opts *GetOptions)).

This makes is more tedious but also a lot more explicit to channel through settings and callbacks.
We should consider if the added clarity is worth the effort.

@dominikschulz dominikschulz added the cleanup Code hygiene label Feb 14, 2021
@dominikschulz dominikschulz added this to the 1.x.x milestone Feb 14, 2021
@dominikschulz dominikschulz changed the title Migrate from ctxutil to option structs Cleanup: Migrate from ctxutil to option structs where feasible Mar 25, 2021
@AnomalRoil AnomalRoil modified the milestones: 1.x.x, 1.14.0 Dec 21, 2021
@dominikschulz dominikschulz self-assigned this Jan 4, 2022
@dominikschulz dominikschulz modified the milestones: 1.14.0, 1.x.x Mar 12, 2022
@dominikschulz dominikschulz mentioned this issue Nov 2, 2022
13 tasks
@dominikschulz
Copy link
Member Author

Much of what should been done has been addressed by #2395. We can always do more cleanups, but for the sake of this issue I'm happy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Code hygiene
Projects
None yet
Development

No branches or pull requests

2 participants