Refactor some code

This commit is contained in:
TwinProduction
2021-09-30 20:56:09 -04:00
parent bc25fea1c0
commit ac43ef4ab7
2 changed files with 6 additions and 11 deletions

View File

@ -38,11 +38,11 @@ func CanPerformStartTLS(address string, config *Config) (connected bool, certifi
if len(hostAndPort) != 2 {
return false, nil, errors.New("invalid address for starttls, format must be host:port")
}
conn, err := net.DialTimeout("tcp", address, config.Timeout)
connection, err := net.DialTimeout("tcp", address, config.Timeout)
if err != nil {
return
}
smtpClient, err := smtp.NewClient(conn, hostAndPort[0])
smtpClient, err := smtp.NewClient(connection, hostAndPort[0])
if err != nil {
return
}