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

Clean up arg parsing #53

Open
telpirion opened this issue Mar 17, 2022 · 0 comments
Open

Clean up arg parsing #53

telpirion opened this issue Mar 17, 2022 · 0 comments
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: cleanup An internal cleanup or hygiene concern.

Comments

@telpirion
Copy link
Contributor

Each do*() method in the cbt parses its own arguments and constructs the appropriate call to the service. It would be nice to refactor these methods to use an argument struct that is composed by another function that only parses arguments.

Why to do this:

  • In some cases, the current situation results in a lot of duplicated call (e.g. doLookup() and doRead()).
  • Each do*() method has multiple concerns--arg parsing and composing the calls to the service. This breaks the principle of orthogonality.
@telpirion telpirion added type: cleanup An internal cleanup or hygiene concern. priority: p3 Desirable enhancement or fix. May not be included in next release. labels Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: cleanup An internal cleanup or hygiene concern.
Projects
None yet
Development

No branches or pull requests

1 participant