From 8d4b79ba724ac76c5ae1273e5fd7c4a3a14432c0 Mon Sep 17 00:00:00 2001 From: "Ben B." Date: Tue, 1 Oct 2024 13:06:37 +0200 Subject: [PATCH] fix(lint): resolve IDENTICAL_BRANCHES issue in broker (#2992) The same code is executed when the condition "err != nil" is true or false, because the code in the if-then branch and after the if statement is identical. Signed-off-by: Benedikt Bongartz --- broker.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/broker.go b/broker.go index d0d5b87b8..d38fc9662 100644 --- a/broker.go +++ b/broker.go @@ -1426,9 +1426,6 @@ func (b *Broker) sendAndReceiveSASLPlainAuthV0() error { func (b *Broker) sendAndReceiveSASLPlainAuthV1(authSendReceiver func(authBytes []byte) (*SaslAuthenticateResponse, error)) error { authBytes := []byte(b.conf.Net.SASL.AuthIdentity + "\x00" + b.conf.Net.SASL.User + "\x00" + b.conf.Net.SASL.Password) _, err := authSendReceiver(authBytes) - if err != nil { - return err - } return err }