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

impriving passing argument to the repository #269

Open
vincenzopalazzo opened this issue Apr 14, 2024 · 0 comments
Open

impriving passing argument to the repository #269

vincenzopalazzo opened this issue Apr 14, 2024 · 0 comments
Labels
💭 - brainstorming feature idea and related discussion 👶 - good first issue Good for newcomers feature request P-medium Medium priority

Comments

@vincenzopalazzo
Copy link
Contributor

I noted that our parameter numbers are increasing so I am going to change the approach.

Every command should have an CommandNameOpts struct that will be passed down to the command, as a single parameter. This helps us to increase the number of parameters without breaking existing API (at least the compilation of the code)

Example code:

struct InstallOption { plugin: String, ...}

coffee.install(InstallOptions::defaults()).await?;
@vincenzopalazzo vincenzopalazzo added 👶 - good first issue Good for newcomers 💭 - brainstorming feature idea and related discussion feature request P-medium Medium priority labels Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💭 - brainstorming feature idea and related discussion 👶 - good first issue Good for newcomers feature request P-medium Medium priority
Projects
None yet
Development

No branches or pull requests

1 participant