Merge pull request #4117 from hashicorp/r-node-status-refactor

Correctly initialize array length
This commit is contained in:
Chelsea Komlo 2018-04-09 14:05:38 -04:00 committed by GitHub
commit bd3132bd6d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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 {