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

feat: Validate Config Existence in config rm #2635

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

bpujol
Copy link

@bpujol bpujol commented Aug 2, 2024

Enhanced the config rm command to check if the specified configuration exists before attempting to remove it.
Modified the deleteCmd function in config/cli.go to include a call to validateServerExistence, ensuring the configuration is present.
If the configuration does not exist, the command now returns an error, preventing further execution and improving user feedback.

This change addresses user concerns about the lack of feedback when removing non-existent configurations, providing a clearer and more robust user experience.

  • [ x] All tests have passed. If this feature is not already covered by the tests, new tests have been added.
  • [x ] The pull request is targeting the dev branch.
  • [x ] The code has been validated to compile successfully by running go vet ./....
  • [x ] The code has been formatted properly using go fmt ./....

Enhanced the config rm command to check if
the specified configuration exists before
attempting to remove it. Modified the
deleteCmd function in config/cli.go to
include a call to
validateServerExistence,
ensuring the configuration is present.
If the configuration does not exist,
the command now returns an error,
preventing further execution
and improving user feedback.

This change addresses user concerns about the
lack of feedback when removing non-existent
configurations, providing a clearer and more
robust user experience.

Signed-off-by: Benjamin Pujol <[email protected]>
Copy link
Contributor

github-actions bot commented Aug 2, 2024


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant