Create the node slice with the proper length

Co-authored-by: Leo Antunes <leo@costela.net>
This commit is contained in:
kaiyou 2020-05-07 08:57:08 +02:00 committed by Leo Antunes
parent b0bfeb1f8e
commit 00c9d5ec76
1 changed files with 1 additions and 1 deletions

View File

@ -52,7 +52,7 @@ func decodeNodeMeta(b []byte) (nodeMeta, error) {
func parseNodesMeta(rawNodes []node) []node { func parseNodesMeta(rawNodes []node) []node {
logrus.Info("cluster members:\n") logrus.Info("cluster members:\n")
nodes := make([]node, 0) nodes := make([]node, 0, len(rawNodes))
for _, node := range rawNodes { for _, node := range rawNodes {
meta, err := decodeNodeMeta(node.Meta) meta, err := decodeNodeMeta(node.Meta)
if err != nil { if err != nil {