correctly initialize array length

This commit is contained in:
Chelsea Holland Komlo
2018-04-09 10:51:08 -04:00
parent 66e1763107
commit bf89de322f

View File

@@ -393,7 +393,7 @@ func (c *NodeStatusCommand) formatNode(client *api.Client, node *api.Node) int {
}
func (c *NodeStatusCommand) outputTruncatedNodeDriverInfo(node *api.Node) string {
drivers := make([]string, 1)
drivers := make([]string, 0, len(node.Drivers))
for driverName, driverInfo := range node.Drivers {
if !driverInfo.Healthy {