From d2d215feaa5b01955108263ec097595d6368aa14 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Sat, 1 Jul 2017 12:31:12 -0300 Subject: [PATCH] renamed fields --- context/context.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/context/context.go b/context/context.go index 26dcd6669..032fe70dd 100644 --- a/context/context.go +++ b/context/context.go @@ -36,13 +36,13 @@ type Context struct { Snapshot bool } -var artifactLock sync.Mutex -var archiveLock sync.Mutex +var artifactsLock sync.Mutex +var binariesLock sync.Mutex // AddArtifact adds a file to upload list func (ctx *Context) AddArtifact(file string) { - artifactLock.Lock() - defer artifactLock.Unlock() + artifactsLock.Lock() + defer artifactsLock.Unlock() file = strings.TrimPrefix(file, ctx.Config.Dist) file = strings.Replace(file, "/", "", -1) ctx.Artifacts = append(ctx.Artifacts, file) @@ -51,8 +51,8 @@ func (ctx *Context) AddArtifact(file string) { // AddBinary adds a built binary to the current context func (ctx *Context) AddBinary(key, file string) { - archiveLock.Lock() - defer archiveLock.Unlock() + binariesLock.Lock() + defer binariesLock.Unlock() ctx.Binaries[key] = file log.WithField("key", key).WithField("binary", file).Info("added") }