Skip to content

Commit

Permalink
Fix linter error
Browse files Browse the repository at this point in the history
Run Linter: rabbitmqclient/vault_reader.go#L116
S1009: should omit nil check; len() for []string is defined as zero
(gosimple)
  • Loading branch information
Zerpet committed Aug 29, 2024
1 parent 768cf8a commit 7b7d802
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rabbitmqclient/vault_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func (vc VaultClient) ReadCredentials(path string) (string, string, error) {
return "", "", errors.New("returned Vault secret is nil")
}

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

Expand Down

0 comments on commit 7b7d802

Please sign in to comment.