-
Notifications
You must be signed in to change notification settings - Fork 62
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
implement kmeshctl version
#919
Conversation
Codecov ReportAttention: Patch coverage is
... and 4 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
ctl/version/version.go
Outdated
func RunVersion(cmd *cobra.Command, args []string) error { | ||
if len(args) == 0 { | ||
v := version.Get() | ||
fmt.Printf("%s\n", v.GitVersion) |
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.
since the CLI tool is built with cobra, is there a reason we shouldn't use the cobra cmd.Printf()
, cmd.PrintErrf()
, etc methods?
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.
good catch! I'll look into it :)
Signed-off-by: YaoZengzeng <[email protected]>
Signed-off-by: YaoZengzeng <[email protected]>
Signed-off-by: YaoZengzeng <[email protected]>
@hzxuzhonghu PTAL |
ctl/version/version.go
Outdated
kmeshctl version | ||
# Show version info of a specific Kmesh daemon | ||
kmesh version <kmesh-daemon-pod>`, |
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.
kmesh version ? or kmeshctl version
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.
good catch!
Signed-off-by: YaoZengzeng <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hzxuzhonghu 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 |
@hzxuzhonghu maybe this PR could get merged. |
@LiZhenCheng9527 Any other comments? |
ping @LiZhenCheng9527 |
/lgtm |
What type of PR is this?
/kind enhancement
What this PR does / why we need it:
Implement
kmeshctl version
to show version ofkmeshctl
orKmesh daemon
Which issue(s) this PR fixes:
Fixes #898
Special notes for your reviewer:
Does this PR introduce a user-facing change?: