From f544955e4aaa3ae7c4a8820a9d562d9a8530d826 Mon Sep 17 00:00:00 2001 From: "Justin Terry (VM)" Date: Fri, 24 May 2019 14:42:48 -0700 Subject: [PATCH] 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) --- pkg/server/sandbox_run.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/server/sandbox_run.go b/pkg/server/sandbox_run.go index 024bbe401..1e885d335 100644 --- a/pkg/server/sandbox_run.go +++ b/pkg/server/sandbox_run.go @@ -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 {