From 69630f37fcebe894b15872148bd8b2496806b60c Mon Sep 17 00:00:00 2001 From: Joseph Richey Date: Sun, 11 Feb 2018 23:56:49 -0800 Subject: 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. --- actions/protector.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actions') 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 } -- cgit v1.2.3