StringSlice trims leading and tailing spaces #1648
Labels
area/v2
relates to / is being considered for v2
kind/bug
describes or fixes a bug
status/triage
maintainers still need to look into this
My urfave/cli version is
v2.23.7
Checklist
Dependency Management
Describe the bug
I expect
cli.StringSliceFlag
to accept leading and tailing spaces, similar to the behavior ofcli.StringFlag
.To reproduce
The following program (see Go Playground) shows that
cli.StringSlice
trims leading and tailing spaces in flag values.Observed behavior
The value was trimmed of leading and tailing spaces.
Expected behavior
The value should be unchanged.
Additional context
Discovered while passing a regexp string as a flag value (
^
).Want to fix this yourself?
Maybe
Run
go version
and paste its output hereRun
go env
and paste its output hereThe text was updated successfully, but these errors were encountered: