Make golangci-lint gofumpt happy

This commit is contained in:
Winni Neessen 2022-10-17 18:13:00 +02:00
parent 5bea905ff9
commit 94ad8af58a
Signed by: wneessen
GPG key ID: 5F3AF39B820C119D
2 changed files with 11 additions and 8 deletions

View file

@ -8,11 +8,12 @@ import (
"context"
"crypto/tls"
"fmt"
"github.com/wneessen/go-mail/auth"
"net/smtp"
"os"
"testing"
"time"
"github.com/wneessen/go-mail/auth"
)
// DefaultHost is used as default hostname for the Client
@ -89,9 +90,11 @@ func TestNewClientWithOptions(t *testing.T) {
{"WithTLSConfig()", WithTLSConfig(&tls.Config{}), false},
{"WithTLSConfig(); config is nil", WithTLSConfig(nil), true},
{"WithSMTPAuth()", WithSMTPAuth(SMTPAuthLogin), false},
{"WithSMTPAuthCustom()",
{
"WithSMTPAuthCustom()",
WithSMTPAuthCustom(smtp.PlainAuth("", "", "", "")),
false},
false,
},
{"WithUsername()", WithUsername("test"), false},
{"WithPassword()", WithPassword("test"), false},
{"WithDSN()", WithDSN(), false},
@ -99,8 +102,10 @@ func TestNewClientWithOptions(t *testing.T) {
{"WithDSNMailReturnType() wrong option", WithDSNMailReturnType("FAIL"), true},
{"WithDSNRcptNotifyType()", WithDSNRcptNotifyType(DSNRcptNotifySuccess), false},
{"WithDSNRcptNotifyType() wrong option", WithDSNRcptNotifyType("FAIL"), true},
{"WithDSNRcptNotifyType() NEVER combination",
WithDSNRcptNotifyType(DSNRcptNotifySuccess, DSNRcptNotifyNever), true},
{
"WithDSNRcptNotifyType() NEVER combination",
WithDSNRcptNotifyType(DSNRcptNotifySuccess, DSNRcptNotifyNever), true,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
@ -796,7 +801,6 @@ func TestClient_DialSendCloseBroken(t *testing.T) {
}
})
}
}
// TestClient_DialSendCloseBrokenWithDSN tests the Dial(), Send() and Close() method of Client with
@ -857,7 +861,6 @@ func TestClient_DialSendCloseBrokenWithDSN(t *testing.T) {
}
})
}
}
// TestClient_auth tests the Dial(), Send() and Close() method of Client with broken settings

View file

@ -132,7 +132,7 @@ const (
// List of MIME versions
const (
//Mime10 is the MIME Version 1.0
// Mime10 is the MIME Version 1.0
Mime10 MIMEVersion = "1.0"
)