mirror of
https://github.com/wneessen/go-mail.git
synced 2024-11-22 13:50:49 +01:00
Updated mail.Address initialization in tests to make golangci-lint happy
Tests for new mail address handling methods have been updated to use {Name:"", Address: "email@example.com"} format for initializing the []*mail.Address slices, instead of the previous shorthand {"", "email@example.com"}. This was done to increase code clarity and explicitness.
This commit is contained in:
parent
cc14864129
commit
43c26a37e3
1 changed files with 15 additions and 15 deletions
30
msg_test.go
30
msg_test.go
|
@ -2947,13 +2947,13 @@ func TestMsg_ToFromString(t *testing.T) {
|
||||||
sf bool
|
sf bool
|
||||||
}{
|
}{
|
||||||
{"valid single address", "test@test.com", []*mail.Address{
|
{"valid single address", "test@test.com", []*mail.Address{
|
||||||
{"", "test@test.com"},
|
{Name: "", Address: "test@test.com"},
|
||||||
}, false},
|
}, false},
|
||||||
{
|
{
|
||||||
"valid multiple addresses", "test@test.com,test2@example.com",
|
"valid multiple addresses", "test@test.com,test2@example.com",
|
||||||
[]*mail.Address{
|
[]*mail.Address{
|
||||||
{"", "test@test.com"},
|
{Name: "", Address: "test@test.com"},
|
||||||
{"", "test2@example.com"},
|
{Name: "", Address: "test2@example.com"},
|
||||||
},
|
},
|
||||||
false,
|
false,
|
||||||
},
|
},
|
||||||
|
@ -2961,8 +2961,8 @@ func TestMsg_ToFromString(t *testing.T) {
|
||||||
"valid multiple addresses with space and name",
|
"valid multiple addresses with space and name",
|
||||||
`test@test.com, "Toni Tester" <test2@example.com>`,
|
`test@test.com, "Toni Tester" <test2@example.com>`,
|
||||||
[]*mail.Address{
|
[]*mail.Address{
|
||||||
{"", "test@test.com"},
|
{Name: "", Address: "test@test.com"},
|
||||||
{"Toni Tester", "test2@example.com"},
|
{Name: "Toni Tester", Address: "test2@example.com"},
|
||||||
},
|
},
|
||||||
false,
|
false,
|
||||||
},
|
},
|
||||||
|
@ -3006,13 +3006,13 @@ func TestMsg_CcFromString(t *testing.T) {
|
||||||
sf bool
|
sf bool
|
||||||
}{
|
}{
|
||||||
{"valid single address", "test@test.com", []*mail.Address{
|
{"valid single address", "test@test.com", []*mail.Address{
|
||||||
{"", "test@test.com"},
|
{Name: "", Address: "test@test.com"},
|
||||||
}, false},
|
}, false},
|
||||||
{
|
{
|
||||||
"valid multiple addresses", "test@test.com,test2@example.com",
|
"valid multiple addresses", "test@test.com,test2@example.com",
|
||||||
[]*mail.Address{
|
[]*mail.Address{
|
||||||
{"", "test@test.com"},
|
{Name: "", Address: "test@test.com"},
|
||||||
{"", "test2@example.com"},
|
{Name: "", Address: "test2@example.com"},
|
||||||
},
|
},
|
||||||
false,
|
false,
|
||||||
},
|
},
|
||||||
|
@ -3020,8 +3020,8 @@ func TestMsg_CcFromString(t *testing.T) {
|
||||||
"valid multiple addresses with space and name",
|
"valid multiple addresses with space and name",
|
||||||
`test@test.com, "Toni Tester" <test2@example.com>`,
|
`test@test.com, "Toni Tester" <test2@example.com>`,
|
||||||
[]*mail.Address{
|
[]*mail.Address{
|
||||||
{"", "test@test.com"},
|
{Name: "", Address: "test@test.com"},
|
||||||
{"Toni Tester", "test2@example.com"},
|
{Name: "Toni Tester", Address: "test2@example.com"},
|
||||||
},
|
},
|
||||||
false,
|
false,
|
||||||
},
|
},
|
||||||
|
@ -3065,13 +3065,13 @@ func TestMsg_BccFromString(t *testing.T) {
|
||||||
sf bool
|
sf bool
|
||||||
}{
|
}{
|
||||||
{"valid single address", "test@test.com", []*mail.Address{
|
{"valid single address", "test@test.com", []*mail.Address{
|
||||||
{"", "test@test.com"},
|
{Name: "", Address: "test@test.com"},
|
||||||
}, false},
|
}, false},
|
||||||
{
|
{
|
||||||
"valid multiple addresses", "test@test.com,test2@example.com",
|
"valid multiple addresses", "test@test.com,test2@example.com",
|
||||||
[]*mail.Address{
|
[]*mail.Address{
|
||||||
{"", "test@test.com"},
|
{Name: "", Address: "test@test.com"},
|
||||||
{"", "test2@example.com"},
|
{Name: "", Address: "test2@example.com"},
|
||||||
},
|
},
|
||||||
false,
|
false,
|
||||||
},
|
},
|
||||||
|
@ -3079,8 +3079,8 @@ func TestMsg_BccFromString(t *testing.T) {
|
||||||
"valid multiple addresses with space and name",
|
"valid multiple addresses with space and name",
|
||||||
`test@test.com, "Toni Tester" <test2@example.com>`,
|
`test@test.com, "Toni Tester" <test2@example.com>`,
|
||||||
[]*mail.Address{
|
[]*mail.Address{
|
||||||
{"", "test@test.com"},
|
{Name: "", Address: "test@test.com"},
|
||||||
{"Toni Tester", "test2@example.com"},
|
{Name: "Toni Tester", Address: "test2@example.com"},
|
||||||
},
|
},
|
||||||
false,
|
false,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue