aboutsummaryrefslogtreecommitdiff
path: root/cmd/fscrypt
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 /cmd/fscrypt
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 'cmd/fscrypt')
-rw-r--r--cmd/fscrypt/commands.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/fscrypt/commands.go b/cmd/fscrypt/commands.go
index 2f23a0f..66450c7 100644
--- a/cmd/fscrypt/commands.go
+++ b/cmd/fscrypt/commands.go
@@ -519,7 +519,7 @@ func createProtectorAction(c *cli.Context) error {
}
prompt := fmt.Sprintf("Create new protector on %q", ctx.Mount.Path)
- if err := askConfirmation(prompt, true, ""); err != nil {
+ if err = askConfirmation(prompt, true, ""); err != nil {
return newExitError(c, err)
}
@@ -561,20 +561,20 @@ func createPolicyAction(c *cli.Context) error {
return newExitError(c, err)
}
- if err := checkRequiredFlags(c, []*stringFlag{protectorFlag}); err != nil {
+ if err = checkRequiredFlags(c, []*stringFlag{protectorFlag}); err != nil {
return err
}
protector, err := getProtectorFromFlag(protectorFlag.Value, ctx.TargetUser)
if err != nil {
return newExitError(c, err)
}
- if err := protector.Unlock(existingKeyFn); err != nil {
+ if err = protector.Unlock(existingKeyFn); err != nil {
return newExitError(c, err)
}
defer protector.Lock()
prompt := fmt.Sprintf("Create new policy on %q", ctx.Mount.Path)
- if err := askConfirmation(prompt, true, ""); err != nil {
+ if err = askConfirmation(prompt, true, ""); err != nil {
return newExitError(c, err)
}