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.
|
Package smtpd implements an SMTP server in golang.
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
package smtpd_test
|
package smtpd_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/chrj/smtpd"
|
|
||||||
"errors"
|
"errors"
|
||||||
"net/smtp"
|
"net/smtp"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/chrj/smtpd"
|
||||||
)
|
)
|
||||||
|
|
||||||
func ExampleServer() {
|
func ExampleServer() {
|
||||||
|
|
|
@ -524,11 +524,10 @@ func (session *session) handleXCLIENT(cmd command) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
newHeloName = ""
|
newHeloName, newUsername string
|
||||||
newAddr net.IP = nil
|
newProto Protocol
|
||||||
newTCPPort uint64 = 0
|
newAddr net.IP
|
||||||
newUsername = ""
|
newTCPPort uint64
|
||||||
newProto Protocol = ""
|
|
||||||
)
|
)
|
||||||
|
|
||||||
for _, item := range cmd.fields[1:] {
|
for _, item := range cmd.fields[1:] {
|
||||||
|
|
7
smtpd.go
7
smtpd.go
|
@ -55,8 +55,11 @@ type Server struct {
|
||||||
type Protocol string
|
type Protocol string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
SMTP Protocol = "SMTP"
|
// SMTP
|
||||||
ESMTP = "ESMTP"
|
SMTP Protocol = "SMTP"
|
||||||
|
|
||||||
|
// Extended SMTP
|
||||||
|
ESMTP = "ESMTP"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Peer represents the client connecting to the server
|
// Peer represents the client connecting to the server
|
||||||
|
|
Loading…
Add table
Reference in a new issue