-
Notifications
You must be signed in to change notification settings - Fork 2.1k
cli: deprecate VisitAll, DisableFlagsInUseLine utilities, remove HasCompletionArg #6273
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
Conversation
It was only used in a single place and has no external consumers. Move it to where it's used to keep things together. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
These utilities were only used internally; create a local copy where used, and deprecate the ones in cli. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
911cfbc to
5a38118
Compare
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.
Pull Request Overview
This PR refactors the CLI utilities by deprecating and removing functions that were only used internally. The main changes include removing the HasCompletionArg utility and deprecating VisitAll and DisableFlagsInUseLine utilities while creating local copies where needed.
- Remove
HasCompletionArgutility and move implementation to where it's used - Deprecate
VisitAllandDisableFlagsInUseLineutilities with local implementations - Fix minor linting issues in cmd/docker package
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| cli/cobra.go | Deprecates VisitAll and DisableFlagsInUseLine utilities, removes HasCompletionArg |
| cli/cobra_test.go | Removes test for deprecated utilities |
| cmd/docker/docker.go | Adds local implementation of removed utilities and fixes linting issues |
| cmd/docker/docker_test.go | Adds test for local visitAll implementation |
| cli-plugins/plugin/plugin.go | Adds local implementation of visitAll utility |
| cli-plugins/plugin/plugin_test.go | Adds test for local visitAll implementation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
cli: remove HasCompletionArg utility
It was only used in a single place and has no external consumers.
Move it to where it's used to keep things together.
cli: deprecate VisitAll, DisableFlagsInUseLine utilities
These utilities were only used internally; create a local copy
where used, and deprecate the ones in cli.
cmd/docker: fix some minor linting issues
- Human readable description for the release notes
- A picture of a cute animal (not mandatory but encouraged)