Merged
Conversation
There was a problem hiding this comment.
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 <18033717+Benehiko@users.noreply.github.com>
58995bc to
78a8856
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)