Fix nil pointer deref in part_test.go

This commit is contained in:
Winni Neessen 2022-03-18 15:09:34 +01:00
parent e909bd5499
commit bf755cd944
Signed by: wneessen
GPG key ID: 5F3AF39B820C119D

View file

@ -19,6 +19,7 @@ func TestPartEncoding(t *testing.T) {
part := m.newPart(TypeTextPlain, WithPartEncoding(tt.enc), nil)
if part == nil {
t.Errorf("newPart() WithPartEncoding() failed: no part returned")
return
}
if part.enc.String() != tt.want {
t.Errorf("newPart() WithPartEncoding() failed: expected encoding: %s, got: %s", tt.want,