coffee-tools / coffee-tools/coffee

impriving passing argument to the repository

Open
#269 0 comments 1 reaction 0 assignees View on GitHub
👶 - good first issue 💭 - brainstorming feature request P-medium
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.