1
0
mirror of https://github.com/nikoksr/notify.git synced 2025-01-20 02:59:56 +02:00

refactor: split error checking to separate line

This commit is contained in:
Haris Chaniotakis 2021-02-12 19:10:12 +02:00
parent a1d960c266
commit 24bfbed1e2

View File

@ -42,7 +42,8 @@ func (m *Mailgun) AddReceivers(addresses ...string) {
func (m Mailgun) Send(subject, message string) error {
mailMessage := m.client.NewMessage(m.senderAddress, subject, message, m.receiverAddresses...)
if _, _, err := m.client.Send(context.Background(), mailMessage); err != nil {
_, _, err := m.client.Send(context.Background(), mailMessage)
if err != nil {
return errors.Wrap(err, "failed to send mail using Mailgun service")
}