From c657603c612650117b4def976ff40d98ba7c3a21 Mon Sep 17 00:00:00 2001 From: Daniel Norberg Date: Wed, 19 Mar 2014 16:00:46 -0400 Subject: [PATCH] variable declaration cleanup Docker-DCO-1.1-Signed-off-by: Daniel Norberg (github: danielnorberg) --- opts/opts.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opts/opts.go b/opts/opts.go index b2f21db30b..67f1c8fd48 100644 --- a/opts/opts.go +++ b/opts/opts.go @@ -143,7 +143,7 @@ func ValidateDomain(val string) (string, error) { return "", fmt.Errorf("%s is not a valid domain", val) } re := regexp.MustCompile(`^(:?(:?[a-zA-Z0-9]|(:?[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9]))(:?\.(:?[a-zA-Z0-9]|(:?[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])))*)\.?\s*$`) - var ns = re.FindSubmatch([]byte(val)) + ns := re.FindSubmatch([]byte(val)) if len(ns) > 0 { return string(ns[1]), nil }