mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 08:44:17 -04:00
Fix various issues with formatting and typos (#424)
* Fix typos * Simplify code * Fix error usage
This commit is contained in:
committed by
Miek Gieben
parent
f402b8f726
commit
ece3cf8ecf
@@ -126,7 +126,7 @@ func TransferParse(c *caddy.Controller, secondary bool) (tos, froms []string, er
|
||||
for i := range tos {
|
||||
if tos[i] != "*" {
|
||||
if x := net.ParseIP(tos[i]); x == nil {
|
||||
return nil, nil, fmt.Errorf("must specify an IP addres: `%s'", tos[i])
|
||||
return nil, nil, fmt.Errorf("must specify an IP address: `%s'", tos[i])
|
||||
}
|
||||
tos[i] = middleware.Addr(tos[i]).Normalize()
|
||||
}
|
||||
@@ -140,7 +140,7 @@ func TransferParse(c *caddy.Controller, secondary bool) (tos, froms []string, er
|
||||
for i := range froms {
|
||||
if froms[i] != "*" {
|
||||
if x := net.ParseIP(froms[i]); x == nil {
|
||||
return nil, nil, fmt.Errorf("must specify an IP addres: `%s'", froms[i])
|
||||
return nil, nil, fmt.Errorf("must specify an IP address: `%s'", froms[i])
|
||||
}
|
||||
froms[i] = middleware.Addr(froms[i]).Normalize()
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user