mirror of
https://github.com/wneessen/go-mail.git
synced 2024-11-22 05:40:50 +01:00
Make golangci-lint gofumpt happy
This commit is contained in:
parent
5bea905ff9
commit
94ad8af58a
2 changed files with 11 additions and 8 deletions
|
@ -8,11 +8,12 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/wneessen/go-mail/auth"
|
|
||||||
"net/smtp"
|
"net/smtp"
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/wneessen/go-mail/auth"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DefaultHost is used as default hostname for the Client
|
// DefaultHost is used as default hostname for the Client
|
||||||
|
@ -89,9 +90,11 @@ func TestNewClientWithOptions(t *testing.T) {
|
||||||
{"WithTLSConfig()", WithTLSConfig(&tls.Config{}), false},
|
{"WithTLSConfig()", WithTLSConfig(&tls.Config{}), false},
|
||||||
{"WithTLSConfig(); config is nil", WithTLSConfig(nil), true},
|
{"WithTLSConfig(); config is nil", WithTLSConfig(nil), true},
|
||||||
{"WithSMTPAuth()", WithSMTPAuth(SMTPAuthLogin), false},
|
{"WithSMTPAuth()", WithSMTPAuth(SMTPAuthLogin), false},
|
||||||
{"WithSMTPAuthCustom()",
|
{
|
||||||
|
"WithSMTPAuthCustom()",
|
||||||
WithSMTPAuthCustom(smtp.PlainAuth("", "", "", "")),
|
WithSMTPAuthCustom(smtp.PlainAuth("", "", "", "")),
|
||||||
false},
|
false,
|
||||||
|
},
|
||||||
{"WithUsername()", WithUsername("test"), false},
|
{"WithUsername()", WithUsername("test"), false},
|
||||||
{"WithPassword()", WithPassword("test"), false},
|
{"WithPassword()", WithPassword("test"), false},
|
||||||
{"WithDSN()", WithDSN(), false},
|
{"WithDSN()", WithDSN(), false},
|
||||||
|
@ -99,8 +102,10 @@ func TestNewClientWithOptions(t *testing.T) {
|
||||||
{"WithDSNMailReturnType() wrong option", WithDSNMailReturnType("FAIL"), true},
|
{"WithDSNMailReturnType() wrong option", WithDSNMailReturnType("FAIL"), true},
|
||||||
{"WithDSNRcptNotifyType()", WithDSNRcptNotifyType(DSNRcptNotifySuccess), false},
|
{"WithDSNRcptNotifyType()", WithDSNRcptNotifyType(DSNRcptNotifySuccess), false},
|
||||||
{"WithDSNRcptNotifyType() wrong option", WithDSNRcptNotifyType("FAIL"), true},
|
{"WithDSNRcptNotifyType() wrong option", WithDSNRcptNotifyType("FAIL"), true},
|
||||||
{"WithDSNRcptNotifyType() NEVER combination",
|
{
|
||||||
WithDSNRcptNotifyType(DSNRcptNotifySuccess, DSNRcptNotifyNever), true},
|
"WithDSNRcptNotifyType() NEVER combination",
|
||||||
|
WithDSNRcptNotifyType(DSNRcptNotifySuccess, DSNRcptNotifyNever), true,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
t.Run(tt.name, func(t *testing.T) {
|
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
|
// 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
|
// TestClient_auth tests the Dial(), Send() and Close() method of Client with broken settings
|
||||||
|
|
|
@ -132,7 +132,7 @@ const (
|
||||||
|
|
||||||
// List of MIME versions
|
// List of MIME versions
|
||||||
const (
|
const (
|
||||||
//Mime10 is the MIME Version 1.0
|
// Mime10 is the MIME Version 1.0
|
||||||
Mime10 MIMEVersion = "1.0"
|
Mime10 MIMEVersion = "1.0"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue