-
Notifications
You must be signed in to change notification settings - Fork 492
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
Fix/enhancing delete 486 #880
Fix/enhancing delete 486 #880
Conversation
…equests by default
add -f,-a flag to delete object from a yaml file or delete all object
Codecov ReportBase: 76.03% // Head: 75.92% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #880 +/- ##
==========================================
- Coverage 76.03% 75.92% -0.11%
==========================================
Files 110 114 +4
Lines 12741 13387 +646
==========================================
+ Hits 9687 10164 +477
- Misses 2507 2647 +140
- Partials 547 576 +29
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
|
||
Run: func(cmd *cobra.Command, args []string) { | ||
handleRequest(http.MethodDelete, makeURL(objectURL, args[0]), nil, cmd) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
args[0] could be invalid after this change.
and delete
is different from create
or update
as it only requires a name instead of full YAML spec, so it is much more easier for the user to make a fault operation. and we should do more checks for the arguments, like what to do if there're both --all
and spec file
in the command line?
don't use the short version to help users avoid faulty operation. Co-authored-by: Bomin Zhang <[email protected]>
add parameter check
update delete all,avoid misusing curl
Co-authored-by: Bomin Zhang <[email protected]>
Co-authored-by: Bomin Zhang <[email protected]>
Co-authored-by: Bomin Zhang <[email protected]>
enhance object delete
add -f,-a flag to delete object from a yaml file or delete all object