coffee-tools / coffee-tools/coffee
impriving passing argument to the repository
- Dominant language
- Rust
- Stars
- 11
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
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:
```rust
struct InstallOption { plugin: String, ...}
coffee.install(InstallOptions::defaults()).await?;
```
Contributor guide
Research direction
Start by locating the command entry points and the current parameter lists, then compare them with the proposed coffee.install and InstallOptions example. Define which commands need CommandNameOpts structs and verify that each command accepts a single options parameter without breaking the intended API.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, cli
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100