From f7bdd8fffc66a2fd380d8a7035dba0ba709360dd Mon Sep 17 00:00:00 2001 From: Winni Neessen Date: Mon, 11 Nov 2024 19:21:50 +0100 Subject: [PATCH] Refactor error variable in smtp test Renamed 'err' to 'berr' to avoid shadowing outer variable. This change ensures clearer error handling and avoids potential issues with variable scope and readability in the smtp_test.go file. --- smtp/smtp_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/smtp/smtp_test.go b/smtp/smtp_test.go index 4d6316a..15ea7c5 100644 --- a/smtp/smtp_test.go +++ b/smtp/smtp_test.go @@ -3665,8 +3665,8 @@ 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 { - t.Errorf("failed write to echo buffer: %s", err) + if _, berr := props.EchoBuffer.Write([]byte(data)); berr != nil { + t.Errorf("failed write to echo buffer: %s", berr) } }