Add Go Report Card, fix a couple of golint warnings.

This commit is contained in:
Christian Joergensen 2017-08-24 11:41:02 +02:00
parent 470c2fc1cb
commit 3ad0b67af6
4 changed files with 12 additions and 9 deletions

@ -1,4 +1,4 @@
Go smtpd [![GoDoc](https://godoc.org/github.com/chrj/smtpd?status.png)](https://godoc.org/github.com/chrj/smtpd)
Go smtpd [![GoDoc](https://godoc.org/github.com/chrj/smtpd?status.png)](https://godoc.org/github.com/chrj/smtpd) [![Go Report Card](https://goreportcard.com/badge/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:] {

@ -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