mirror of
https://github.com/go-gitea/gitea
synced 2025-07-23 02:38:35 +00:00
Enable addtional linters (#34085)
enable mirror, usestdlibbars and perfsprint part of: https://github.com/go-gitea/gitea/issues/34083 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -5,6 +5,7 @@ package sender
|
||||
|
||||
import (
|
||||
"crypto/tls"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"net"
|
||||
@@ -99,7 +100,7 @@ func (s *SMTPSender) Send(from string, to []string, msg io.WriterTo) error {
|
||||
canAuth, options := client.Extension("AUTH")
|
||||
if len(opts.User) > 0 {
|
||||
if !canAuth {
|
||||
return fmt.Errorf("SMTP server does not support AUTH, but credentials provided")
|
||||
return errors.New("SMTP server does not support AUTH, but credentials provided")
|
||||
}
|
||||
|
||||
var auth smtp.Auth
|
||||
|
Reference in New Issue
Block a user