-
Notifications
You must be signed in to change notification settings - Fork 2.1k
cli/command/system: add utilities for printing, don't pass CLI if not needed #4181
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
Merged
Conversation
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
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #4181 +/- ##
=======================================
Coverage 58.87% 58.88%
=======================================
Files 570 570
Lines 49558 49566 +8
=======================================
+ Hits 29178 29186 +8
Misses 18616 18616
Partials 1764 1764 |
8f15df6 to
84ab1fc
Compare
84ab1fc to
7102b83
Compare
7102b83 to
06d1baa
Compare
06d1baa to
7d4c778
Compare
goos: linux
goarch: arm64
pkg: github.com/docker/cli/cli/command/system
BenchmarkPrettyPrintInfo
BenchmarkPrettyPrintInfo-5 189028 6156 ns/op 1776 B/op 88 allocs/op
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
7d4c778 to
90842dc
Compare
…ith import Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Don't require whole of DockerCLI to be passed, as all we need is a writer. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Don't require whole of DockerCLI to be passed, as all we need is a writer. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
No need to pass whole of DockerCLI, as all it needs is the outputs. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
No need to pass whole of DockerCLI, as all it needs is the outputs. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
No need to pass whole of DockerCLI, as all it needs is the outputs. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Adding some utilities to print the output, to keep the linters happier without having to either suppress errors, or ignore them. Perhaps we should consider adding utilities for this on the "command.Streams" outputs. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
90842dc to
155f7d9
Compare
sam-thibault
approved these changes
May 3, 2023
Contributor
sam-thibault
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
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.
github.com/docker/cli/cli/command/system: add BenchmarkPrettyPrintInfo
cli/command/system: add utilities for printing, don't pass CLI if not needed
Many of these functions only needed an io.Writer (stdout), so change their
signature to reflect that.
Also adding some utilities to print the output, to keep the linters happier
without having to either suppress errors, or ignore them.
Perhaps we should consider adding utilities for this on the "command.Streams"
outputs.
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)