mirror of
https://github.com/wneessen/go-mail.git
synced 2024-11-15 02:12:55 +01:00
Fix linter errors
Replaced `err == io.EOF` with `errors.Is(err, io.EOF)` for better error comparison. Removed redundant `break` statements to streamline case logic and improve code readability.
This commit is contained in:
parent
482194b4b3
commit
157c138142
1 changed files with 1 additions and 4 deletions
|
@ -2097,7 +2097,7 @@ func handleTestServerConnection(connection net.Conn, featureSet string, failRese
|
|||
for {
|
||||
data, err = reader.ReadString('\n')
|
||||
if err != nil {
|
||||
if err == io.EOF {
|
||||
if errors.Is(err, io.EOF) {
|
||||
break
|
||||
}
|
||||
fmt.Println("Error reading data:", err)
|
||||
|
@ -2158,17 +2158,14 @@ func handleTestServerConnection(connection net.Conn, featureSet string, failRese
|
|||
case strings.EqualFold(data, "noop"),
|
||||
strings.EqualFold(data, "vrfy"):
|
||||
writeOK()
|
||||
break
|
||||
case strings.EqualFold(data, "rset"):
|
||||
if failReset {
|
||||
_ = writeLine("500 5.1.2 Error: reset failed")
|
||||
break
|
||||
}
|
||||
writeOK()
|
||||
break
|
||||
case strings.EqualFold(data, "quit"):
|
||||
_ = writeLine("221 2.0.0 Bye")
|
||||
break
|
||||
default:
|
||||
_ = writeLine("500 5.5.2 Error: bad syntax")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue