-
-
Notifications
You must be signed in to change notification settings - Fork 732
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
CLI Enhancement: Ability to specify all command parameters in a json file ("command-params-file" flag) #597
Comments
Hello @kcq I would like to work on this issue can you please assign it to me and tell me which files need to be changed |
thecoons
added a commit
to thecoons/slim
that referenced
this issue
Oct 24, 2023
This commit introduces a new flag `FlagCommandParamsFile` across multiple command files, allowing parameters to be loaded from a specified file. The `LoadParamsFromFile` function has been defined to handle file reading and parameter setting. Additionally, code comments and formatting have been updated for improved readability. This enhancement provides a more flexible and organized way to handle command parameters, especially in cases with numerous or complex parameter sets.
thecoons
added a commit
to thecoons/slim
that referenced
this issue
Oct 24, 2023
This commit introduces a new flag `FlagCommandParamsFile` across multiple command files, allowing parameters to be loaded from a specified file. The `LoadParamsFromFile` function has been defined to handle file reading and parameter setting. Additionally, code comments and formatting have been updated for improved readability. This enhancement provides a more flexible and organized way to handle command parameters, especially in cases with numerous or complex parameter sets. Signed-off-by: Barthelemy Antonin <antobarth@gmail.com>
@kcq , still need this done? let me know, can work on this. |
@kcq is this issue still open? |
I was just been playing around with this issue yesterday and think I have a solution outlined, I would be keen to try and post a PR over this weekend. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Right now each CLI command accepts a set of command parameters as separate command line flags. It's ok for adhoc use, but it's less ideal for automation. The goal for the "command-params-file" flag is to provide an ability to specify all required command-specific parameters in one JSON formatted file.
There's already a placeholder for the flag, but there's no logic to load and process the file data.
This is a good first issue for somebody already comfortable with Go and refactoring a significant amount of CLI flag processing code.
The text was updated successfully, but these errors were encountered: