mirror of
https://github.com/wneessen/go-mail.git
synced 2024-12-22 18:50:37 +01:00
chore: golang lint
This commit is contained in:
parent
e3fb10d897
commit
1821cc743f
2 changed files with 5 additions and 7 deletions
|
@ -679,7 +679,7 @@ func TestMsgWriter_writeBody(t *testing.T) {
|
||||||
buffer := bytes.NewBuffer(nil)
|
buffer := bytes.NewBuffer(nil)
|
||||||
msgwriter.writer = buffer
|
msgwriter.writer = buffer
|
||||||
message := testMessage(t)
|
message := testMessage(t)
|
||||||
msgwriter.writeBody(message.parts[0].writeFunc, NoEncoding)
|
msgwriter.writeBody(message.parts[0].writeFunc, NoEncoding, false)
|
||||||
if msgwriter.err != nil {
|
if msgwriter.err != nil {
|
||||||
t.Errorf("writeBody failed to write: %s", msgwriter.err)
|
t.Errorf("writeBody failed to write: %s", msgwriter.err)
|
||||||
}
|
}
|
||||||
|
@ -687,7 +687,7 @@ func TestMsgWriter_writeBody(t *testing.T) {
|
||||||
t.Run("writeBody on NoEncoding fails on write", func(t *testing.T) {
|
t.Run("writeBody on NoEncoding fails on write", func(t *testing.T) {
|
||||||
msgwriter.writer = failReadWriteSeekCloser{}
|
msgwriter.writer = failReadWriteSeekCloser{}
|
||||||
message := testMessage(t)
|
message := testMessage(t)
|
||||||
msgwriter.writeBody(message.parts[0].writeFunc, NoEncoding)
|
msgwriter.writeBody(message.parts[0].writeFunc, NoEncoding, false)
|
||||||
if msgwriter.err == nil {
|
if msgwriter.err == nil {
|
||||||
t.Errorf("writeBody succeeded, expected error")
|
t.Errorf("writeBody succeeded, expected error")
|
||||||
}
|
}
|
||||||
|
@ -701,7 +701,7 @@ func TestMsgWriter_writeBody(t *testing.T) {
|
||||||
writeFunc := func(io.Writer) (int64, error) {
|
writeFunc := func(io.Writer) (int64, error) {
|
||||||
return 0, errors.New("intentional write failure")
|
return 0, errors.New("intentional write failure")
|
||||||
}
|
}
|
||||||
msgwriter.writeBody(writeFunc, NoEncoding)
|
msgwriter.writeBody(writeFunc, NoEncoding, false)
|
||||||
if msgwriter.err == nil {
|
if msgwriter.err == nil {
|
||||||
t.Errorf("writeBody succeeded, expected error")
|
t.Errorf("writeBody succeeded, expected error")
|
||||||
}
|
}
|
||||||
|
@ -712,7 +712,7 @@ func TestMsgWriter_writeBody(t *testing.T) {
|
||||||
t.Run("writeBody Quoted-Printable fails on write", func(t *testing.T) {
|
t.Run("writeBody Quoted-Printable fails on write", func(t *testing.T) {
|
||||||
msgwriter.writer = failReadWriteSeekCloser{}
|
msgwriter.writer = failReadWriteSeekCloser{}
|
||||||
message := testMessage(t)
|
message := testMessage(t)
|
||||||
msgwriter.writeBody(message.parts[0].writeFunc, EncodingQP)
|
msgwriter.writeBody(message.parts[0].writeFunc, EncodingQP, false)
|
||||||
if msgwriter.err == nil {
|
if msgwriter.err == nil {
|
||||||
t.Errorf("writeBody succeeded, expected error")
|
t.Errorf("writeBody succeeded, expected error")
|
||||||
}
|
}
|
||||||
|
@ -804,5 +804,3 @@ func TestMsgWriter_writeMsg_SMime(t *testing.T) {
|
||||||
t.Errorf("writeMsg failed. Unable to find Content-Type")
|
t.Errorf("writeMsg failed. Unable to find Content-Type")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@ func createTestCertificate() (*certKeyPair, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func createTestCertificateByIssuer(name string, issuer *certKeyPair) (*certKeyPair, error) {
|
func createTestCertificateByIssuer(name string, issuer *certKeyPair) (*certKeyPair, error) {
|
||||||
priv, err := rsa.GenerateKey(rand.Reader, 1024)
|
priv, err := rsa.GenerateKey(rand.Reader, 2048)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue