From bf89de322ffb78a86ed2e605a0bf7206808a3952 Mon Sep 17 00:00:00 2001 From: Chelsea Holland Komlo Date: Mon, 9 Apr 2018 10:51:08 -0400 Subject: [PATCH] correctly initialize array length --- command/node_status.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/node_status.go b/command/node_status.go index bffdcba57..25333e03a 100644 --- a/command/node_status.go +++ b/command/node_status.go @@ -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 {