From 1fcef6966f620258c4341f355ec5316254047c13 Mon Sep 17 00:00:00 2001 From: zryfish Date: Thu, 20 Aug 2020 15:04:44 +0800 Subject: [PATCH] fix search node with invalid name bug (#2902) Signed-off-by: Jeff --- pkg/models/resources/v1alpha3/node/nodes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/models/resources/v1alpha3/node/nodes.go b/pkg/models/resources/v1alpha3/node/nodes.go index df4d8262..c39bedf5 100644 --- a/pkg/models/resources/v1alpha3/node/nodes.go +++ b/pkg/models/resources/v1alpha3/node/nodes.go @@ -115,7 +115,7 @@ func (c nodesGetter) List(_ string, q *query.Query) (*api.ListResult, error) { } } - var result []interface{} + var result = make([]interface{}, 0) for _, node := range selectedNodes { c.annotateNode(node, nonTerminatedPodsList) result = append(result, node) -- GitLab