Add Go Report Card, fix a couple of golint warnings.
This commit is contained in:
parent
470c2fc1cb
commit
3ad0b67af6
@ -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.
|
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:] {
|
||||||
|
3
smtpd.go
3
smtpd.go
@ -55,7 +55,10 @@ type Server struct {
|
|||||||
type Protocol string
|
type Protocol string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
// SMTP
|
||||||
SMTP Protocol = "SMTP"
|
SMTP Protocol = "SMTP"
|
||||||
|
|
||||||
|
// Extended SMTP
|
||||||
ESMTP = "ESMTP"
|
ESMTP = "ESMTP"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user