Skip to content

Commit

Permalink
optimized regex flag
Browse files Browse the repository at this point in the history
  • Loading branch information
mehrdadrad committed Jul 20, 2016
1 parent 04343be commit 8371bf9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 8371bf9

Please sign in to comment.