Create the node slice with the proper length
Co-authored-by: Leo Antunes <leo@costela.net>
This commit is contained in:
parent
b0bfeb1f8e
commit
00c9d5ec76
2
node.go
2
node.go
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue