mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 16:24:19 -04:00
Fix middleware log
This commit is contained in:
15
middleware/name.go
Normal file
15
middleware/name.go
Normal 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)
|
||||
}
|
||||
Reference in New Issue
Block a user