aboutsummaryrefslogtreecommitdiff
path: root/lib/smtp
diff options
context:
space:
mode:
authorShulhan <m.shulhan@gmail.com>2020-06-06 05:25:23 +0700
committerShulhan <m.shulhan@gmail.com>2020-06-06 05:25:42 +0700
commitb1133f25df3ec38b503e1ea6129ea6b3397968bb (patch)
tree53a2c6755c6a2e0d9ed13b84603e5b8bcd2e3ee0 /lib/smtp
parent8661178b08ce640d7c24aec8465802e4d5160e2a (diff)
downloadpakakeh.go-b1133f25df3ec38b503e1ea6129ea6b3397968bb.tar.xz
all: use default linter options
Diffstat (limited to 'lib/smtp')
-rw-r--r--lib/smtp/client.go4
-rw-r--r--lib/smtp/command.go2
-rw-r--r--lib/smtp/extension.go1
-rw-r--r--lib/smtp/mail.go1
-rw-r--r--lib/smtp/server.go1
-rw-r--r--lib/smtp/smtp_test.go1
6 files changed, 3 insertions, 7 deletions
diff --git a/lib/smtp/client.go b/lib/smtp/client.go
index 21ad0d69..67b24e2b 100644
--- a/lib/smtp/client.go
+++ b/lib/smtp/client.go
@@ -166,7 +166,7 @@ func (cl *Client) connect(localName string) (res *Response, err error) {
if cl.isTLS {
tlsConfig := &tls.Config{
ServerName: cl.serverName,
- InsecureSkipVerify: cl.insecure, //nolint:gosec
+ InsecureSkipVerify: cl.insecure,
}
cl.conn = tls.Client(cl.conn, tlsConfig)
@@ -467,7 +467,7 @@ func (cl *Client) StartTLS() (res *Response, err error) {
tlsConfig := &tls.Config{
ServerName: cl.serverName,
- InsecureSkipVerify: cl.insecure, //nolint:gosec
+ InsecureSkipVerify: cl.insecure,
}
cl.conn = tls.Client(cl.conn, tlsConfig)
diff --git a/lib/smtp/command.go b/lib/smtp/command.go
index d9c58608..a21363bd 100644
--- a/lib/smtp/command.go
+++ b/lib/smtp/command.go
@@ -142,7 +142,7 @@ func (cmd *Command) reset() {
//
// unpack parse a command type, argument, and their parameters.
//
-func (cmd *Command) unpack(b []byte) (err error) { //nolint:gocyclo,gocognit
+func (cmd *Command) unpack(b []byte) (err error) {
// Minimum command length is 4 + CRLF.
if len(b) < 6 {
return errCmdUnknown
diff --git a/lib/smtp/extension.go b/lib/smtp/extension.go
index 1a902c52..6adcecc0 100644
--- a/lib/smtp/extension.go
+++ b/lib/smtp/extension.go
@@ -25,7 +25,6 @@ type Extension interface {
ValidateCommand(cmd *Command) error
}
-//nolint:gochecknoglobals
var defaultExts = []Extension{
&extDSN{},
}
diff --git a/lib/smtp/mail.go b/lib/smtp/mail.go
index aca86fde..d4bebb65 100644
--- a/lib/smtp/mail.go
+++ b/lib/smtp/mail.go
@@ -92,7 +92,6 @@ func (mail *MailTx) isPostponed() bool {
//
// seal the mail envelope by inserting trace information into message content.
//
-//nolint:gosec
func (mail *MailTx) seal(clientDomain, clientAddress, localAddress string) {
line := fmt.Sprintf("FROM %s (%s)\r\n\tBY %s WITH SMTP ID %s;\r\n\t%s",
clientDomain, clientAddress, localAddress, mail.ID,
diff --git a/lib/smtp/server.go b/lib/smtp/server.go
index 3a8e6df9..5854bf61 100644
--- a/lib/smtp/server.go
+++ b/lib/smtp/server.go
@@ -255,7 +255,6 @@ out:
//
// handleCommand from client.
//
-//nolint:gocyclo
func (srv *Server) handleCommand(recv *receiver, cmd *Command) (err error) {
if debug.Value > 0 {
log.Printf("handleCommand: %v\n", cmd)
diff --git a/lib/smtp/smtp_test.go b/lib/smtp/smtp_test.go
index 1976d902..24f57a0f 100644
--- a/lib/smtp/smtp_test.go
+++ b/lib/smtp/smtp_test.go
@@ -25,7 +25,6 @@ const (
testFilePrivateKey = "testdata/" + testDomain + ".key.pem"
)
-//nolint:gochecknoglobals
var (
testClient *Client
testServer *Server