From 9a05add7fe48bf64f4d262903e30263655242d2d Mon Sep 17 00:00:00 2001 From: Benedikt Bongartz Date: Mon, 30 Sep 2024 11:43:48 +0200 Subject: [PATCH] fix(lint): resolve IDENTICAL_BRANCHES issue in broker 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. --- 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 }