Fix middleware log

This commit is contained in:
Miek Gieben
2016-03-19 11:16:08 +00:00
parent 3511c87d03
commit 39dbd447b5
9 changed files with 181 additions and 66 deletions

15
middleware/name.go Normal file
View File

@@ -0,0 +1,15 @@
package middleware
import "strings"
// Name represents a domain name.
type Name string
// Matches checks to see if other matches n.
//
// Name matching will probably not always be a direct
// comparison; this method assures that names can be
// easily and consistently matched.
func (n Name) Matches(other string) bool {
return strings.HasSuffix(string(n), other)
}