mirror of
https://github.com/wneessen/go-mail.git
synced 2024-11-15 02:12:55 +01:00
Fix variable declarations in test cases
Changed variable declarations from '=' to ':=' to properly handle errors within the SMTP test cases. This ensures that errors are correctly captured and reported when writing to the EchoBuffer.
This commit is contained in:
parent
1d19290e1c
commit
61353d51e5
1 changed files with 2 additions and 2 deletions
|
@ -3692,7 +3692,7 @@ func handleTestServerConnection(connection net.Conn, t *testing.T, props *server
|
|||
}
|
||||
time.Sleep(time.Millisecond)
|
||||
if props.EchoBuffer != nil {
|
||||
if _, err = props.EchoBuffer.Write([]byte(data)); err != nil {
|
||||
if _, err := props.EchoBuffer.Write([]byte(data)); err != nil {
|
||||
t.Errorf("failed write to echo buffer: %s", err)
|
||||
}
|
||||
}
|
||||
|
@ -3795,7 +3795,7 @@ func handleTestServerConnection(connection net.Conn, t *testing.T, props *server
|
|||
break
|
||||
}
|
||||
if props.EchoBuffer != nil {
|
||||
if _, err = props.EchoBuffer.Write([]byte(ddata)); err != nil {
|
||||
if _, err := props.EchoBuffer.Write([]byte(ddata)); err != nil {
|
||||
t.Errorf("failed write to echo buffer: %s", err)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue