Now filter name is trimmed and lowercased before evaluation for case
insensitive and whitespace trimemd check.

Signed-off-by: Oh Jinkyun <tintypemolly@gmail.com>
This commit is contained in:
Oh Jinkyun 2014-11-03 20:11:29 +09:00
parent bfe8d7af74
commit 2ada51fd7f

View file

@ -29,7 +29,9 @@ func ParseFlag(arg string, prev Args) (Args, error) {
} }
f := strings.SplitN(arg, "=", 2) f := strings.SplitN(arg, "=", 2)
filters[f[0]] = append(filters[f[0]], f[1]) name := strings.ToLower(strings.TrimSpace(f[0]))
value := strings.TrimSpace(f[1])
filters[name] = append(filters[name], value)
return filters, nil return filters, nil
} }