From 5c9f651b24864bb322d3d1f51bc717bd06b6eb55 Mon Sep 17 00:00:00 2001 From: rusttech Date: Wed, 2 Oct 2024 13:42:38 +0800 Subject: [PATCH] fix: fix slice init 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 37b59babc712..277a01219bd4 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) }