mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
Lint: Fix ST1005: error strings should not be capitalized (#834)
This commit is contained in:
@@ -24,7 +24,7 @@ func ReverseDomainName(cidr string) (string, error) {
|
||||
bits, total := c.Mask.Size()
|
||||
var toTrim int
|
||||
if bits == 0 {
|
||||
return "", fmt.Errorf("Cannot use /0 in reverse cidr")
|
||||
return "", fmt.Errorf("cannot use /0 in reverse CIDR")
|
||||
}
|
||||
|
||||
// Handle IPv4 "Classless in-addr.arpa delegation" RFC2317:
|
||||
@@ -48,7 +48,7 @@ func ReverseDomainName(cidr string) (string, error) {
|
||||
}
|
||||
toTrim = (total - bits) / 4
|
||||
} else {
|
||||
return "", fmt.Errorf("Address is not IPv4 or IPv6: %v", cidr)
|
||||
return "", fmt.Errorf("invalid address (not IPv4 or IPv6): %v", cidr)
|
||||
}
|
||||
|
||||
parts := strings.SplitN(base, ".", toTrim+1)
|
||||
|
@@ -92,7 +92,7 @@ func IP(address net.IP, transforms []IPConversion) (net.IP, error) {
|
||||
return nil, err
|
||||
}
|
||||
if len(ips) != 1 {
|
||||
return nil, fmt.Errorf("Expect exactly one ip for IP result. Got: %s", ips)
|
||||
return nil, fmt.Errorf("exactly one IP expected. Got: %s", ips)
|
||||
}
|
||||
return ips[0], err
|
||||
}
|
||||
|
Reference in New Issue
Block a user