-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Unexport network commands #6316
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
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 deprecates exported network commands by adding deprecation warnings and moving the implementation to unexported functions. This follows a pattern of encapsulating command creation to prevent direct imports while maintaining backward compatibility.
- Deprecate
NewNetworkCommandandNewPruneCommandfunctions with deprecation comments - Create unexported
newNetworkCommandandnewPruneCommandfunctions containing the actual implementation - Update parameter naming from
dockerClitodockerCLIfor consistency - Add staticcheck suppressions for deprecated function usage
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| cli/command/network/prune.go | Deprecates NewPruneCommand and creates unexported newPruneCommand with consistent parameter naming |
| cli/command/network/cmd.go | Deprecates NewNetworkCommand and creates unexported newNetworkCommand, updates all subcommand calls to use unexported functions |
| cli/command/commands/commands.go | Adds staticcheck suppression for deprecated NewNetworkCommand usage |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
a1f10b6 to
58995bc
Compare
This patch deprecates exported network commands and moves the implementation details to an unexported function. Commands that are affected include: - network.NewNetworkCommand - network.NewPruneCommand Signed-off-by: Alano Terblanche <[email protected]>
58995bc to
78a8856
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
thaJeztah
left a comment
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.
LGTM
This patch deprecates exported network commands and moves the implementation details to an unexported function.
Commands that are affected include:
- What I did
- How I did it
- How to verify it
- Human readable description for the release notes
- A picture of a cute animal (not mandatory but encouraged)