aboutsummaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorJoseph Richey <joerichey94@gmail.com>2018-02-11 23:56:49 -0800
committerJoseph Richey <joerichey94@gmail.com>2018-02-11 23:56:49 -0800
commit69630f37fcebe894b15872148bd8b2496806b60c (patch)
tree1ae1ed02acba2c9beef4a81652d5594c67cf60e6 /actions
parent1f508cc30f3c1caadea5c648158880eacfe9b113 (diff)
vet: eliminate unnecessary shadowing
Running "go vet -shadow ./..." finds all places where a variable might be incorrectly or unnecessarily shadowed. This fixes some of them.
Diffstat (limited to 'actions')
-rw-r--r--actions/protector.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/actions/protector.go b/actions/protector.go
index ffc3c43..fe5d694 100644
--- a/actions/protector.go
+++ b/actions/protector.go
@@ -123,7 +123,7 @@ func CreateProtector(ctx *Context, name string, keyFn KeyFunc) (*Protector, erro
// UID for this kind of source.
protector.data.Uid = int64(util.AtoiOrPanic(ctx.TargetUser.Uid))
// Make sure we aren't duplicating protectors
- if err := checkIfUserHasLoginProtector(ctx, protector.data.Uid); err != nil {
+ if err = checkIfUserHasLoginProtector(ctx, protector.data.Uid); err != nil {
return nil, err
}
fallthrough
@@ -142,7 +142,7 @@ func CreateProtector(ctx *Context, name string, keyFn KeyFunc) (*Protector, erro
}
protector.data.ProtectorDescriptor = crypto.ComputeDescriptor(protector.key)
- if err := protector.Rewrap(keyFn); err != nil {
+ if err = protector.Rewrap(keyFn); err != nil {
protector.Lock()
return nil, err
}