Skip to content
This repository was archived by the owner on Feb 16, 2023. It is now read-only.

Commit 62a53eb

Browse files
committed
Rename error variable listLevels func to improve readability
1 parent fb4dc31 commit 62a53eb

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

internals/secrethub/acl_check.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,17 @@ func (cmd *ACLCheckCommand) listLevels() ([]*api.AccessLevel, error) {
8585

8686
path := cmd.path.Value()
8787

88-
levels, err := client.AccessRules().ListLevels(path)
89-
if err == nil {
88+
levels, listLevelsErr := client.AccessRules().ListLevels(path)
89+
if listLevelsErr == nil {
9090
return levels, nil
9191
}
92-
if !api.IsErrNotFound(err) {
93-
return nil, err
92+
if !api.IsErrNotFound(listLevelsErr) {
93+
return nil, listLevelsErr
9494
}
9595

9696
isSecret, isSecretErr := client.Secrets().Exists(path)
9797
if isSecretErr != nil {
98-
return nil, err
98+
return nil, listLevelsErr
9999
}
100100
if isSecret {
101101
levels, err = client.AccessRules().ListLevels(secretpath.Parent(path))
@@ -104,6 +104,6 @@ func (cmd *ACLCheckCommand) listLevels() ([]*api.AccessLevel, error) {
104104
}
105105
return levels, nil
106106
}
107-
return nil, err
107+
return nil, listLevelsErr
108108

109109
}

0 commit comments

Comments
 (0)