cli: fix some command output formatting

- remove brackets around silence ID when adding new silence
- fix simple formatting of show config

Signed-off-by: Paul Gier <pgier@redhat.com>
This commit is contained in:
Paul Gier 2019-03-25 09:23:37 -05:00
parent 2d483fac88
commit 6561774f9e
2 changed files with 2 additions and 2 deletions

View File

@ -72,7 +72,7 @@ func (formatter *SimpleFormatter) FormatAlerts(alerts []*models.GettableAlert) e
}
func (formatter *SimpleFormatter) FormatConfig(status *models.AlertmanagerStatus) error {
fmt.Fprintln(formatter.writer, *status)
fmt.Fprintln(formatter.writer, *status.Config.Original)
return nil
}

View File

@ -169,6 +169,6 @@ func (c *silenceAddCmd) add(ctx context.Context, _ *kingpin.ParseContext) error
if err != nil {
return err
}
fmt.Println(*postOk.Payload)
_, err = fmt.Println(postOk.Payload.SilenceID)
return err
}