Add Go Report Card, fix a couple of golint warnings.
This commit is contained in:
parent
470c2fc1cb
commit
3ad0b67af6
4 changed files with 12 additions and 9 deletions
|
@ -1,4 +1,4 @@
|
|||
Go smtpd [](https://godoc.org/github.com/chrj/smtpd)
|
||||
Go smtpd [](https://godoc.org/github.com/chrj/smtpd) [](https://goreportcard.com/report/github.com/chrj/smtpd)
|
||||
========
|
||||
|
||||
Package smtpd implements an SMTP server in golang.
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
package smtpd_test
|
||||
|
||||
import (
|
||||
"github.com/chrj/smtpd"
|
||||
"errors"
|
||||
"net/smtp"
|
||||
"strings"
|
||||
|
||||
"github.com/chrj/smtpd"
|
||||
)
|
||||
|
||||
func ExampleServer() {
|
||||
|
|
|
@ -524,11 +524,10 @@ func (session *session) handleXCLIENT(cmd command) {
|
|||
}
|
||||
|
||||
var (
|
||||
newHeloName = ""
|
||||
newAddr net.IP = nil
|
||||
newTCPPort uint64 = 0
|
||||
newUsername = ""
|
||||
newProto Protocol = ""
|
||||
newHeloName, newUsername string
|
||||
newProto Protocol
|
||||
newAddr net.IP
|
||||
newTCPPort uint64
|
||||
)
|
||||
|
||||
for _, item := range cmd.fields[1:] {
|
||||
|
|
7
smtpd.go
7
smtpd.go
|
@ -55,8 +55,11 @@ type Server struct {
|
|||
type Protocol string
|
||||
|
||||
const (
|
||||
SMTP Protocol = "SMTP"
|
||||
ESMTP = "ESMTP"
|
||||
// SMTP
|
||||
SMTP Protocol = "SMTP"
|
||||
|
||||
// Extended SMTP
|
||||
ESMTP = "ESMTP"
|
||||
)
|
||||
|
||||
// Peer represents the client connecting to the server
|
||||
|
|
Loading…
Add table
Reference in a new issue