aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2016-04-03 07:44:28 +0100
committerGravatar Miek Gieben <miek@miek.nl> 2016-04-03 07:44:28 +0100
commit7fb959470e95517967c4f0bcf85f1adf9a77a42f (patch)
treeb05d72178b877e2b37c69cf0e97f0fa2d716795c
parent6ecbdef112b3bf0759a60914d0eb08540c5274ed (diff)
downloadcoredns-7fb959470e95517967c4f0bcf85f1adf9a77a42f.tar.gz
coredns-7fb959470e95517967c4f0bcf85f1adf9a77a42f.tar.zst
coredns-7fb959470e95517967c4f0bcf85f1adf9a77a42f.zip
Rename Standard to Normalize
Some doc updates and tweaks.
-rw-r--r--middleware/file/notify.go1
-rw-r--r--middleware/host.go8
-rw-r--r--middleware/zone.go2
3 files changed, 6 insertions, 5 deletions
diff --git a/middleware/file/notify.go b/middleware/file/notify.go
index 58cc66e79..cc8f493e4 100644
--- a/middleware/file/notify.go
+++ b/middleware/file/notify.go
@@ -4,6 +4,7 @@ import (
"fmt"
"github.com/miekg/coredns/middleware"
+
"github.com/miekg/dns"
)
diff --git a/middleware/host.go b/middleware/host.go
index 7b9b9a42a..65dbefbca 100644
--- a/middleware/host.go
+++ b/middleware/host.go
@@ -13,9 +13,9 @@ type (
Addr string
)
-// Standard will return the host portion of host, stripping
+// Normalize will return the host portion of host, stripping
// of any port. The host will also be fully qualified and lowercased.
-func (h Host) Standard() string {
+func (h Host) Normalize() string {
// separate host and port
host, _, err := net.SplitHostPort(string(h))
if err != nil {
@@ -24,9 +24,9 @@ func (h Host) Standard() string {
return strings.ToLower(dns.Fqdn(host))
}
-// Standard will return a normalized address, if not port is specified
+// Normalize will return a normalized address, if not port is specified
// port 53 is added, otherwise the port will be left as is.
-func (a Addr) Standard() string {
+func (a Addr) Normalize() string {
// separate host and port
addr, port, err := net.SplitHostPort(string(a))
if err != nil {
diff --git a/middleware/zone.go b/middleware/zone.go
index 6da172e15..85a9d438e 100644
--- a/middleware/zone.go
+++ b/middleware/zone.go
@@ -24,7 +24,7 @@ func (z Zones) Matches(qname string) string {
return zone
}
-// Fully qualify all zones in z
+// FullyQualify fully qualifies all zones in z.
func (z Zones) FullyQualify() {
for i, _ := range z {
z[i] = dns.Fqdn(z[i])