Skip to content

Commit

Permalink
chore: small refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
iamKunalGupta committed Mar 12, 2024
1 parent 858fde1 commit 1d9e9c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions flow/alerting/alerting.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ func (a *Alerter) registerSendersFromPool(ctx context.Context) ([]AlertSenderCon
alertSenderConfigs = append(alertSenderConfigs, AlertSenderConfig{Id: id, Sender: newSlackAlertSender(&slackServiceConfig)})
case EMAIL:
var replyToAddresses []string
if envString := strings.TrimSpace(
peerdbenv.PeerDBAlertingEmailSenderReplyToAddresses()); len(envString) != 0 {
replyToAddresses = strings.Split(envString, ",")
if replyToEnvString := strings.TrimSpace(
peerdbenv.PeerDBAlertingEmailSenderReplyToAddresses()); len(replyToEnvString) != 0 {

Check failure on line 57 in flow/alerting/alerting.go

View workflow job for this annotation

GitHub Actions / lint

emptyStringTest: replace `len(replyToEnvString) != 0` with `replyToEnvString != ""` (gocritic)
replyToAddresses = strings.Split(replyToEnvString, ",")
}
emailServiceConfig := EmailAlertSenderConfig{
sourceEmail: peerdbenv.PeerDBAlertingEmailSenderSourceEmail(),
Expand Down

0 comments on commit 1d9e9c3

Please sign in to comment.