diff options
author | 2018-12-17 02:24:59 -0800 | |
---|---|---|
committer | 2018-12-17 10:24:59 +0000 | |
commit | 38790c722258c135b1e518dfd2469dec12d32fb7 (patch) | |
tree | 9432134639ed9fbd6637f9ca694f0e24bef1ad63 | |
parent | 14f8b5d75aaafe253403f18817d325ee33b9c876 (diff) | |
download | coredns-38790c722258c135b1e518dfd2469dec12d32fb7.tar.gz coredns-38790c722258c135b1e518dfd2469dec12d32fb7.tar.zst coredns-38790c722258c135b1e518dfd2469dec12d32fb7.zip |
Fix nits in address.go. (#2404)
-rw-r--r-- | core/dnsserver/address.go | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/core/dnsserver/address.go b/core/dnsserver/address.go index 5d3d2b393..9bcca3d7a 100644 --- a/core/dnsserver/address.go +++ b/core/dnsserver/address.go @@ -20,7 +20,7 @@ type zoneAddr struct { Address string // used for bound zoneAddr - validation of overlapping } -// String return the string representation of z. +// String returns the string representation of z. func (z zoneAddr) String() string { s := z.Transport + "://" + z.Zone + ":" + z.Port if z.Address != "" { @@ -29,13 +29,10 @@ func (z zoneAddr) String() string { return s } -// normalizeZone parses an zone string into a structured format with separate +// normalizeZone parses a zone string into a structured format with separate // host, and port portions, as well as the original input string. func normalizeZone(str string) (zoneAddr, error) { - var err error - - var trans string - trans, str = parse.Transport(str) + trans, str := parse.Transport(str) host, port, ipnet, err := plugin.SplitHostPort(str) if err != nil { |