Skip to content

Commit

Permalink
Update smtp.go
Browse files Browse the repository at this point in the history
Signed-off-by: kannan-nic <[email protected]>
  • Loading branch information
kannan-nic authored May 2, 2024
1 parent 403825f commit 1e2031a
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions connector/smtp/smtp.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,13 @@ func (sc *smtpConnector) Login(ctx context.Context, _ connector.Scopes, username

var conn net.Conn

if strings.Contains(p, "tls") {

if strings.Contains(p, "tls") {

Check failure on line 41 in connector/smtp/smtp.go

View workflow job for this annotation

GitHub Actions / Lint

ifElseChain: rewrite if-else to switch statement (gocritic)
sc.cfg.Host = sc.cfg.Host[0 : len(sc.cfg.Host)-3]
p = p[0 : len(p)-3]

Check failure on line 43 in connector/smtp/smtp.go

View workflow job for this annotation

GitHub Actions / Lint

SA4006: this value of `p` is never used (staticcheck)
tlsconfig := &tls.Config {
InsecureSkipVerify: true,
ServerName: h,
}

InsecureSkipVerify: true,
ServerName: h,
}
conn, err = tls.Dial("tcp", sc.cfg.Host, tlsconfig)
if err != nil {
return

Check failure on line 50 in connector/smtp/smtp.go

View workflow job for this annotation

GitHub Actions / Lint

naked return in func `Login` with 86 lines of code (nakedret)
Expand Down

0 comments on commit 1e2031a

Please sign in to comment.