From 7365d6cb13b362feab5a30a9ebad8c32a5fb0c01 Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Mon, 25 Jul 2022 16:37:30 +0200 Subject: [PATCH] short error return syntax --- services/notifications/pkg/channels/channels.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/services/notifications/pkg/channels/channels.go b/services/notifications/pkg/channels/channels.go index 9a83dcfb3c..896dc8afcf 100644 --- a/services/notifications/pkg/channels/channels.go +++ b/services/notifications/pkg/channels/channels.go @@ -70,17 +70,11 @@ func (m Mail) SendMessage(userIDs []string, msg string) error { email := mail.NewMSG() - email.SetFrom(m.conf.Notifications.SMTP.Sender). - AddTo(to...) + email.SetFrom(m.conf.Notifications.SMTP.Sender).AddTo(to...) email.SetBody(mail.TextPlain, msg) - err = email.Send(smtpClient) - if err != nil { - return err - } - - return nil + return email.Send(smtpClient) } // SendMessageToGroup sends a message to all members of the given group.