v2 bug: default value changes with parsed values on slice flags #1235
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
Checklist
Dependency Management
Describe the bug
default value changes with parsed values on slice flags.
To reproduce
I have put the test code here
Observed behavior
The default value of slices changes from the parsed value:
--stringSlice value, --ss value (default: "stringSlice") // bug expect: (default: "default1", "default2")
--float64Slice value, --f64s value (default: 13.3) // bug expect: (default: 1.1, 2.2)
--int64Slice value, --i64s value (default: 13) // bug expect: (default: 1, 2)
--intSlice value, --is value (default: 13) // bug expect: (default: 1, 2)
Expected behavior
Expected default values:
--stringSlice value, --ss value (default: "default1", "default2")
--float64Slice value, --f64s value (default: 1.1, 2.2)
--int64Slice value, --i64s value (default: 1, 2)
--intSlice value, --is value (default: 1, 2)
Additional context
Add any other context about the problem here.
If the issue relates to a specific open source Github repo, please link that repo here.
If you can reproduce this issue with a public CI system, please link a failing build here.
Want to fix this yourself?
We'd love to have more contributors on this project! If the fix for this bug is easily explained and very small, free free to create a pull request for it.
Run
go version
and paste its output hereRun
go env
and paste its output hereThe text was updated successfully, but these errors were encountered: