diff --git a/command/node_status.go b/command/node_status.go index 37b59babc71..277a01219bd 100644 --- a/command/node_status.go +++ b/command/node_status.go @@ -794,7 +794,7 @@ func formatEventDetails(details map[string]string) string { func (c *NodeStatusCommand) formatAttributes(node *api.Node) { // Print the attributes - keys := make([]string, len(node.Attributes)) + keys := make([]string, 0, len(node.Attributes)) for k := range node.Attributes { keys = append(keys, k) }