From 8b4365e51d60e46c25a27ec2b9c676785b65cb25 Mon Sep 17 00:00:00 2001 From: Sharif Elgamal Date: Wed, 21 Aug 2019 18:55:35 -0700 Subject: [PATCH] change confusing variable name --- pkg/util/lock/lock.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/util/lock/lock.go b/pkg/util/lock/lock.go index 6e28029481..5b8febd88a 100644 --- a/pkg/util/lock/lock.go +++ b/pkg/util/lock/lock.go @@ -62,9 +62,9 @@ func getMutexName(filename string) string { name = strings.ReplaceAll(name, ".", "-") name = strings.ReplaceAll(name, "_", "-") - profile := strings.ReplaceAll(filepath.Base(dir), ".", "-") - profile = strings.ReplaceAll(profile, "_", "-") - mutexName := fmt.Sprintf("%s-%s", profile, strings.ReplaceAll(name, ".", "-")) + p := strings.ReplaceAll(filepath.Base(dir), ".", "-") + p = strings.ReplaceAll(p, "_", "-") + mutexName := fmt.Sprintf("%s-%s", p, strings.ReplaceAll(name, ".", "-")) // Make sure name doesn't start with a dash mutexName = strings.TrimPrefix(mutexName, "-")