mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 00:34:24 -04:00
@@ -12,7 +12,7 @@ import (
|
||||
|
||||
// See core/dnsserver/address.go - we should unify these two impls.
|
||||
|
||||
// Zones respresents a lists of zone names.
|
||||
// Zones represents a lists of zone names.
|
||||
type Zones []string
|
||||
|
||||
// Matches checks if qname is a subdomain of any of the zones in z. The match
|
||||
@@ -65,7 +65,7 @@ func (h Host) Normalize() string {
|
||||
s := string(h)
|
||||
_, s = parse.Transport(s)
|
||||
|
||||
// The error can be ignore here, because this function is called after the corefile has already been vetted.
|
||||
// The error can be ignored here, because this function is called after the corefile has already been vetted.
|
||||
host, _, _, _ := SplitHostPort(s)
|
||||
return Name(host).Normalize()
|
||||
}
|
||||
@@ -76,7 +76,7 @@ func (h Host) Normalize() string {
|
||||
func SplitHostPort(s string) (host, port string, ipnet *net.IPNet, err error) {
|
||||
// If there is: :[0-9]+ on the end we assume this is the port. This works for (ascii) domain
|
||||
// names and our reverse syntax, which always needs a /mask *before* the port.
|
||||
// So from the back, find first colon, and then check if its a number.
|
||||
// So from the back, find first colon, and then check if it's a number.
|
||||
host = s
|
||||
|
||||
colon := strings.LastIndex(s, ":")
|
||||
|
||||
Reference in New Issue
Block a user