diff options
Diffstat (limited to 'plugin/rewrite/name.go')
-rw-r--r-- | plugin/rewrite/name.go | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/plugin/rewrite/name.go b/plugin/rewrite/name.go index 86a5f1ecd..e1c2a1114 100644 --- a/plugin/rewrite/name.go +++ b/plugin/rewrite/name.go @@ -9,8 +9,6 @@ import ( "github.com/coredns/coredns/plugin" "github.com/coredns/coredns/request" - - "github.com/miekg/dns" ) type exactNameRule struct { @@ -264,19 +262,6 @@ func (rule *substringNameRule) GetResponseRule() ResponseRule { return ResponseR // GetResponseRule return a rule to rewrite the response with. func (rule *regexNameRule) GetResponseRule() ResponseRule { return rule.ResponseRule } -// validName returns true if s is valid domain name and shorter than 256 characters. -func validName(s string) bool { - _, ok := dns.IsDomainName(s) - if !ok { - return false - } - if len(dns.Name(s).String()) > 255 { - return false - } - - return true -} - // hasClosingDot return true if s has a closing dot at the end. func hasClosingDot(s string) bool { if strings.HasSuffix(s, ".") { |