-
Notifications
You must be signed in to change notification settings - Fork 1.4k
pkg/virtctl/version: code cleanups and refactoring (#14085) #14104
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
pkg/virtctl/version: code cleanups and refactoring (#14085) #14104
Conversation
Hi @salawhaaat. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
624bd29
to
80fb459
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.
Awesome, I have only two nits. Please address them and mark the PR ready for review/testing after.
Sweet, done. Thank you for quick response. |
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.
Looks good! 🙌
Could you also please rebase commits into a single commit for a cleaner git history as preferred! Thanks :)
65f8645
to
961114e
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.
/test all
Looks like you need to run |
thx, i will try 👍 |
…ability Signed-off-by: salawhaaat <[email protected]> nit: rename virCli to virtClient Signed-off-by: salawhaaat <[email protected]> remove comments Signed-off-by: salawhaaat <[email protected]> remove comments Signed-off-by: salawhaaat <[email protected]> make format Signed-off-by: salawhaaat <[email protected]>
961114e
to
5d20c0f
Compare
/retest |
@salawhaaat: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/test all |
@salawhaaat: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
@0xFelix I am very sorry that it took long. The reason behind that, I couldn't start make process without docker, since I had docker issue. |
No worries /test all |
Tests are happy too. |
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.
/approve
Thank you very much @salawhaaat
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 0xFelix The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Required labels detected, running phase 2 presubmits: |
Yeaaaah, let's goo. I will be happy to continue on next open task. |
What this PR does
Before this PR:
virtctl version
command contained unnecessary complexity.fmt.Sprintf("%#v", value)
redundantly.cobra.ExactArgs(0)
instead ofcobra.NoArgs
.After this PR:
usage()
to use a multiline string for better readability.fmt.Errorf("%w", err)
for better error wrapping.cobra.NoArgs
for idiomatic Go practices.fmt.Sprintf("%#v", value)
calls inprintf
.Run()
function.Fixes #14085
Why we need it and why it was done in this way
The following tradeoffs were made:
The following alternatives were considered:
Links to places where the discussion took place: #14085
Special notes for your reviewer
Checklist
This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.
Release note