From f2110b5a4e9ec2a46b7aba7fcf450a87ad3797f6 Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Thu, 21 Sep 2017 16:56:11 -0400 Subject: [PATCH] More consistent output --- command/format.go | 2 +- command/operator_rekey.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/command/format.go b/command/format.go index a23268e46..b8669303b 100644 --- a/command/format.go +++ b/command/format.go @@ -250,6 +250,6 @@ func OutputSealStatus(ui cli.Ui, client *api.Client, status *api.SealStatusRespo } } - ui.Output(tableOutput(out, nil)) + ui.Output(columnOutput(out, nil)) return 0 } diff --git a/command/operator_rekey.go b/command/operator_rekey.go index c80845820..595f1f3af 100644 --- a/command/operator_rekey.go +++ b/command/operator_rekey.go @@ -567,11 +567,12 @@ func (c *OperatorRekeyCommand) backupDelete(client *api.Client) int { // printStatus dumps the status to output func (c *OperatorRekeyCommand) printStatus(status *api.RekeyStatusResponse) int { out := []string{} + out = append(out, "Key | Value") out = append(out, fmt.Sprintf("Nonce | %s", status.Nonce)) out = append(out, fmt.Sprintf("Started | %t", status.Started)) if status.Started { - out = append(out, fmt.Sprintf("Progress | %d/%d", status.Progress, status.Required)) + out = append(out, fmt.Sprintf("Rekey Progress | %d/%d", status.Progress, status.Required)) out = append(out, fmt.Sprintf("New Shares | %d", status.N)) out = append(out, fmt.Sprintf("New Threshold | %d", status.T)) } @@ -581,8 +582,7 @@ func (c *OperatorRekeyCommand) printStatus(status *api.RekeyStatusResponse) int out = append(out, fmt.Sprintf("Backup | %t", status.Backup)) } - output := columnOutput(out, nil) - c.UI.Output(output) + c.UI.Output(tableOutput(out, nil)) return 0 }