From aa30683fde747535af3e95dd117c8e022e317739 Mon Sep 17 00:00:00 2001 From: Karim Radhouani Date: Wed, 23 Jun 2021 09:12:07 +0800 Subject: [PATCH] rename var --- cmd/deploy.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd/deploy.go b/cmd/deploy.go index 4260a3dca..539541e6d 100644 --- a/cmd/deploy.go +++ b/cmd/deploy.go @@ -252,10 +252,10 @@ func hostsEntries(containers []types.GenericContainer, bridgeName string) []byte return buff.Bytes() } -func enrichNodes(containers []types.GenericContainer, nodes map[string]nodes.Node, mgmtNet string) { +func enrichNodes(containers []types.GenericContainer, nodesMap map[string]nodes.Node, mgmtNet string) { for _, c := range containers { name = c.Labels["clab-node-name"] - if node, ok := nodes[name]; ok { + if node, ok := nodesMap[name]; ok { // add network information // skipping host networking nodes as they don't have separate addresses if strings.ToLower(node.Config().NetworkMode) == "host" { @@ -271,6 +271,5 @@ func enrichNodes(containers []types.GenericContainer, nodes map[string]nodes.Nod node.Config().ContainerID = c.ID } - } }