coffee-tools / coffee

Reference implementation for a flexible core lightning plugin manager
https://docs.page/coffee-tools/coffee
9 stars 13 forks source link

impriving passing argument to the repository #269

Open vincenzopalazzo opened 2 months ago

vincenzopalazzo commented 2 months ago

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?;