1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-18 18:17:03 +00:00

Move metrics ticker to log pkg for #67

This commit is contained in:
James Hillyerd
2017-12-26 18:15:38 -08:00
parent dec67622ba
commit fcc0848bc0
3 changed files with 84 additions and 54 deletions

View File

@@ -2,7 +2,6 @@ package smtpd
import (
"bytes"
"container/list"
"crypto/sha1"
"fmt"
"io"
@@ -53,18 +52,6 @@ func HashMailboxName(mailbox string) string {
return fmt.Sprintf("%x", h.Sum(nil))
}
// JoinStringList joins a List containing strings by commas
func JoinStringList(listOfStrings *list.List) string {
if listOfStrings.Len() == 0 {
return ""
}
s := make([]string, 0, listOfStrings.Len())
for e := listOfStrings.Front(); e != nil; e = e.Next() {
s = append(s, e.Value.(string))
}
return strings.Join(s, ",")
}
// ValidateDomainPart returns true if the domain part complies to RFC3696, RFC1035
func ValidateDomainPart(domain string) bool {
if len(domain) == 0 {