Make Linter happy

This commit is contained in:
Winni Neessen 2022-03-13 17:58:47 +01:00
parent 2b7cb54cf6
commit 96dab9103c
Signed by: wneessen
GPG key ID: 5F3AF39B820C119D
2 changed files with 4 additions and 5 deletions

1
msg.go
View file

@ -50,7 +50,6 @@ type Msg struct {
// Part is a part of the Msg // Part is a part of the Msg
type Part struct { type Part struct {
w func(io.Writer) error w func(io.Writer) error
x io.Writer
ctype ContentType ctype ContentType
enc Encoding enc Encoding
} }

View file

@ -179,7 +179,7 @@ func TestMsg_From(t *testing.T) {
na := fmt.Sprintf(`"%s" <%s>`, n, a) na := fmt.Sprintf(`"%s" <%s>`, n, a)
m := NewMsg() m := NewMsg()
gs, err := m.GetSender(false) _, err := m.GetSender(false)
if err == nil { if err == nil {
t.Errorf("GetSender(false) without a set From address succeeded but was expected to fail") t.Errorf("GetSender(false) without a set From address succeeded but was expected to fail")
return return
@ -189,7 +189,7 @@ func TestMsg_From(t *testing.T) {
t.Errorf("failed to set FROM addresses: %s", err) t.Errorf("failed to set FROM addresses: %s", err)
return return
} }
gs, err = m.GetSender(false) gs, err := m.GetSender(false)
if err != nil { if err != nil {
t.Errorf("GetSender(false) failed: %s", err) t.Errorf("GetSender(false) failed: %s", err)
return return
@ -504,7 +504,7 @@ func TestMsg_GetRecipients(t *testing.T) {
a := []string{"to@example.com", "cc@example.com", "bcc@example.com"} a := []string{"to@example.com", "cc@example.com", "bcc@example.com"}
m := NewMsg() m := NewMsg()
al, err := m.GetRecipients() _, err := m.GetRecipients()
if err == nil { if err == nil {
t.Errorf("GetRecipients() succeeded but was expected to fail") t.Errorf("GetRecipients() succeeded but was expected to fail")
return return
@ -523,7 +523,7 @@ func TestMsg_GetRecipients(t *testing.T) {
return return
} }
al, err = m.GetRecipients() al, err := m.GetRecipients()
if err != nil { if err != nil {
t.Errorf("GetRecipients() failed: %s", err) t.Errorf("GetRecipients() failed: %s", err)
return return