From 8371bf94053179fe2e1e69b13b796d40c59ab3fc Mon Sep 17 00:00:00 2001 From: Mehrdad Arshad Rad Date: Tue, 19 Jul 2016 22:28:17 -0700 Subject: [PATCH] optimized regex flag --- cli/cli.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/cli.go b/cli/cli.go index 333f36b2..0f7e9adf 100644 --- a/cli/cli.go +++ b/cli/cli.go @@ -247,7 +247,7 @@ func Flag(args string) (string, map[string]interface{}) { err error ) args = strings.TrimSpace(args) - re := regexp.MustCompile(`(?i)-([a-z]+)={0,1}\s{0,1}([0-9|a-z]+)`) + re := regexp.MustCompile(`(?i)-([a-z]+)={0,1}\s{0,1}([0-9|a-z|-]+)`) f := re.FindAllStringSubmatch(args, -1) for _, kv := range f { if len(kv) > 1 {