Update parseDNSOptions maxDNSSearches in error message
Minor correctness. We should use the value of the const in the error message instead of hard coding it in the string so if maxDNSSearches ever changes so does the error. Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
This commit is contained in:
parent
6e14e01307
commit
f544955e4a
@ -500,7 +500,7 @@ func parseDNSOptions(servers, searches, options []string) (string, error) {
|
||||
resolvContent := ""
|
||||
|
||||
if len(searches) > maxDNSSearches {
|
||||
return "", errors.New("DNSOption.Searches has more than 6 domains")
|
||||
return "", errors.Errorf("DNSOption.Searches has more than %d domains", maxDNSSearches)
|
||||
}
|
||||
|
||||
if len(searches) > 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user