mirror of
https://github.com/wneessen/go-mail.git
synced 2024-11-15 02:12:55 +01:00
Refactor buffer initialization in client tests
Replaced &bytes.Buffer{} with bytes.NewBuffer(nil) for buffer initialization in various client tests. This change ensures more idiomatic and consistent creation of byte buffers throughout the test cases.
This commit is contained in:
parent
21184e60b9
commit
0db1383940
1 changed files with 3 additions and 3 deletions
|
@ -1135,7 +1135,7 @@ func TestClient_SetDebugLog(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Fatalf("failed to create new client: %s", err)
|
||||
}
|
||||
buffer := &bytes.Buffer{}
|
||||
buffer := bytes.NewBuffer(nil)
|
||||
client.SetLogger(log.New(buffer, log.LevelDebug))
|
||||
client.SetDebugLog(true)
|
||||
|
||||
|
@ -1164,7 +1164,7 @@ func TestClient_SetDebugLog(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Fatalf("failed to create new client: %s", err)
|
||||
}
|
||||
buffer := &bytes.Buffer{}
|
||||
buffer := bytes.NewBuffer(nil)
|
||||
client.SetLogger(log.New(buffer, log.LevelDebug))
|
||||
client.SetDebugLog(false)
|
||||
|
||||
|
@ -1202,7 +1202,7 @@ func TestClient_SetDebugLog(t *testing.T) {
|
|||
}
|
||||
})
|
||||
|
||||
buffer := &bytes.Buffer{}
|
||||
buffer := bytes.NewBuffer(nil)
|
||||
client.SetLogger(log.New(buffer, log.LevelDebug))
|
||||
client.SetDebugLog(true)
|
||||
if err = client.smtpClient.Noop(); err != nil {
|
||||
|
|
Loading…
Reference in a new issue