mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 08:44:17 -04:00
Fix nits in address.go. (#2404)
This commit is contained in:
committed by
Miek Gieben
parent
14f8b5d75a
commit
38790c7222
@@ -20,7 +20,7 @@ type zoneAddr struct {
|
|||||||
Address string // used for bound zoneAddr - validation of overlapping
|
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 {
|
func (z zoneAddr) String() string {
|
||||||
s := z.Transport + "://" + z.Zone + ":" + z.Port
|
s := z.Transport + "://" + z.Zone + ":" + z.Port
|
||||||
if z.Address != "" {
|
if z.Address != "" {
|
||||||
@@ -29,13 +29,10 @@ func (z zoneAddr) String() string {
|
|||||||
return s
|
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.
|
// host, and port portions, as well as the original input string.
|
||||||
func normalizeZone(str string) (zoneAddr, error) {
|
func normalizeZone(str string) (zoneAddr, error) {
|
||||||
var err error
|
trans, str := parse.Transport(str)
|
||||||
|
|
||||||
var trans string
|
|
||||||
trans, str = parse.Transport(str)
|
|
||||||
|
|
||||||
host, port, ipnet, err := plugin.SplitHostPort(str)
|
host, port, ipnet, err := plugin.SplitHostPort(str)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user