mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 06:27:05 +00:00
Make "kubeadm version" json format output more readable.
This commit is contained in:
parent
d8205661b7
commit
bb070a64a8
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user