Commit bb070a64 authored by xiangpengzhao's avatar xiangpengzhao

Make "kubeadm version" json format output more readable.

parent d8205661
...@@ -67,7 +67,7 @@ func RunVersion(out io.Writer, cmd *cobra.Command) error { ...@@ -67,7 +67,7 @@ func RunVersion(out io.Writer, cmd *cobra.Command) error {
} }
fmt.Fprintln(out, string(y)) fmt.Fprintln(out, string(y))
case "json": case "json":
y, err := json.Marshal(&v) y, err := json.MarshalIndent(&v, "", " ")
if err != nil { if err != nil {
return err return err
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment