From 7b7d8027232a496215aa1ff517c39be4201a0d6d Mon Sep 17 00:00:00 2001 From: Aitor Perez Cedres <1515757+Zerpet@users.noreply.github.com> Date: Mon, 19 Aug 2024 17:12:20 +0100 Subject: [PATCH] Fix linter error Run Linter: rabbitmqclient/vault_reader.go#L116 S1009: should omit nil check; len() for []string is defined as zero (gosimple) --- rabbitmqclient/vault_reader.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rabbitmqclient/vault_reader.go b/rabbitmqclient/vault_reader.go index befa1977..27c12229 100644 --- a/rabbitmqclient/vault_reader.go +++ b/rabbitmqclient/vault_reader.go @@ -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) }