Skip to content

Commit 7b7d802

Browse files
committed
Fix linter error
Run Linter: rabbitmqclient/vault_reader.go#L116 S1009: should omit nil check; len() for []string is defined as zero (gosimple)
1 parent 768cf8a commit 7b7d802

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: rabbitmqclient/vault_reader.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ func (vc VaultClient) ReadCredentials(path string) (string, string, error) {
113113
return "", "", errors.New("returned Vault secret is nil")
114114
}
115115

116-
if secret.Warnings != nil && len(secret.Warnings) > 0 {
116+
if len(secret.Warnings) > 0 {
117117
return "", "", fmt.Errorf("warnings were returned from Vault: %v", secret.Warnings)
118118
}
119119

0 commit comments

Comments
 (0)