From 94ad8af58a0cc7f50be3d7692ec01acf0576b169 Mon Sep 17 00:00:00 2001 From: Winni Neessen Date: Mon, 17 Oct 2022 18:13:00 +0200 Subject: [PATCH] Make golangci-lint gofumpt happy --- client_test.go | 17 ++++++++++------- encoding.go | 2 +- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/client_test.go b/client_test.go index d7e568a..47965ac 100644 --- a/client_test.go +++ b/client_test.go @@ -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 diff --git a/encoding.go b/encoding.go index 3fd20e0..f10a903 100644 --- a/encoding.go +++ b/encoding.go @@ -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" )