mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
metrics return bytes instead of string for more flexibility
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user