Skip to content

Commit

Permalink
use print of cobra
Browse files Browse the repository at this point in the history
Signed-off-by: YaoZengzeng <[email protected]>
  • Loading branch information
YaoZengzeng committed Oct 8, 2024
1 parent 0cba2b2 commit 25b7591
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ctl/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ kmesh version <kmesh-daemon-pod>`,
func RunVersion(cmd *cobra.Command, args []string) error {
if len(args) == 0 {
v := version.Get()
fmt.Printf("%s\n", v.GitVersion)
cmd.Printf("%s\n", v.GitVersion)

return nil
}
Expand Down Expand Up @@ -83,7 +83,7 @@ func RunVersion(cmd *cobra.Command, args []string) error {
os.Exit(1)
}

fmt.Println(string(body))
cmd.Println(string(body))

return nil
}

0 comments on commit 25b7591

Please sign in to comment.