Fix various issues with formatting and typos (#424)

* Fix typos

* Simplify code

* Fix error usage
This commit is contained in:
Michael Grosser
2016-11-13 14:03:12 +00:00
committed by Miek Gieben
parent f402b8f726
commit ece3cf8ecf
13 changed files with 19 additions and 19 deletions

View File

@@ -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 {