From c778599e9ecd7d97a8a2a64911a66240af063241 Mon Sep 17 00:00:00 2001 From: Ryan Uber Date: Mon, 14 Sep 2015 20:29:08 -0700 Subject: [PATCH] command: separate k/v pairs with an '=' --- command/node_status.go | 6 +++++- command/status.go | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/command/node_status.go b/command/node_status.go index b70f07221..4c6f809f5 100644 --- a/command/node_status.go +++ b/command/node_status.go @@ -104,7 +104,11 @@ func (c *NodeStatusCommand) Run(args []string) int { fmt.Sprintf("Status | %s", node.Status), } + // Make the column config so we can dump k = v pairs + columnConf := columnize.DefaultConfig() + columnConf.Glue = " = " + // Dump the output - c.Ui.Output(columnize.SimpleFormat(out)) + c.Ui.Output(columnize.Format(out, columnConf)) return 0 } diff --git a/command/status.go b/command/status.go index dbe95ba35..3e445240e 100644 --- a/command/status.go +++ b/command/status.go @@ -93,7 +93,12 @@ func (c *StatusCommand) Run(args []string) int { fmt.Sprintf("Status | %s", job.Status), fmt.Sprintf("StatusDescription | %s", job.StatusDescription), } - c.Ui.Output(columnize.SimpleFormat(basic)) + // Make the column config so we can dump k = v pairs + columnConf := columnize.DefaultConfig() + columnConf.Glue = " = " + + // Dump the output + c.Ui.Output(columnize.Format(basic, columnConf)) return 0 }