metrics return bytes instead of string for more flexibility

This commit is contained in:
davemay99
2020-10-06 10:49:15 -04:00
parent e0e3a01404
commit ec09c593b5
3 changed files with 11 additions and 11 deletions

View File

@@ -88,12 +88,14 @@ func (c *OperatorMetricsCommand) Run(args []string) int {
Params: params,
}
resp, err := client.Operator().Metrics(query)
bs, err := client.Operator().Metrics(query)
if err != nil {
c.Ui.Error(fmt.Sprintf("Error getting metrics: %v", err))
return 1
}
resp := string(bs[:])
c.Ui.Output(resp)
return 0
}