From 93f57705110e196dca1cf2b2ce7d261ee97b9e4e Mon Sep 17 00:00:00 2001 From: Alexander Morozov Date: Mon, 21 Mar 2016 15:01:08 -0700 Subject: [PATCH] runconfig/opts: fix compilation issue it was introduced with #20566 as a result of merge Signed-off-by: Alexander Morozov --- runconfig/opts/parse.go | 1 + 1 file changed, 1 insertion(+) diff --git a/runconfig/opts/parse.go b/runconfig/opts/parse.go index dc14e56d5e..722b8d8b3a 100644 --- a/runconfig/opts/parse.go +++ b/runconfig/opts/parse.go @@ -242,6 +242,7 @@ func Parse(cmd *flag.FlagSet, args []string) (*container.Config, *container.Host entrypoint = strslice.StrSlice{*flEntrypoint} } // Validate if the given hostname is RFC 1123 (https://tools.ietf.org/html/rfc1123) compliant. + hostname := *flHostname if hostname != "" { matched, _ := regexp.MatchString("^(([[:alnum:]]|[[:alnum:]][[:alnum:]\\-]*[[:alnum:]])\\.)*([[:alnum:]]|[[:alnum:]][[:alnum:]\\-]*[[:alnum:]])$", hostname) if !matched {