Make "kubeadm version" json format output more readable.

This commit is contained in:
xiangpengzhao 2017-07-31 20:17:41 +08:00
parent d8205661b7
commit bb070a64a8

View File

@ -67,7 +67,7 @@ func RunVersion(out io.Writer, cmd *cobra.Command) error {
}
fmt.Fprintln(out, string(y))
case "json":
y, err := json.Marshal(&v)
y, err := json.MarshalIndent(&v, "", " ")
if err != nil {
return err
}