From 95c4502b81da0f64fdca045aa7e7acffbaaeb3bf Mon Sep 17 00:00:00 2001 From: Ulysses Souza Date: Sun, 28 Nov 2021 15:43:27 +0100 Subject: [PATCH] Refactoring variable name Signed-off-by: Ulysses Souza --- pkg/compose/convergence.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/compose/convergence.go b/pkg/compose/convergence.go index aa89c2b35..8cac07ffb 100644 --- a/pkg/compose/convergence.go +++ b/pkg/compose/convergence.go @@ -489,9 +489,9 @@ func (s composeService) getLinks(ctx context.Context, projectName string, servic for _, rawLink := range service.Links { linkSplit := strings.Split(rawLink, ":") linkServiceName := linkSplit[0] - l := linkServiceName + linkName := linkServiceName if len(linkSplit) == 2 { - l = linkSplit[1] // linkName if informed like in: "serviceName:linkName" + linkName = linkSplit[1] // linkName if informed like in: "serviceName:linkName" } cnts, err := getServiceContainers(linkServiceName) if err != nil { @@ -500,7 +500,7 @@ func (s composeService) getLinks(ctx context.Context, projectName string, servic for _, c := range cnts { containerName := getCanonicalContainerName(c) links = append(links, - format(containerName, l), + format(containerName, linkName), format(containerName, strings.Join([]string{linkServiceName, strconv.Itoa(number)}, Separator)), format(containerName, strings.Join([]string{projectName, linkServiceName, strconv.Itoa(number)}, Separator)), )