diff options
| author | Eric Paris <[email protected]> | 2015-08-12 10:54:26 -0400 |
|---|---|---|
| committer | Eric Paris <[email protected]> | 2015-08-12 11:06:13 -0400 |
| commit | 95a6a40798df11df014298af8a8250af515fa753 (patch) | |
| tree | a06e3ca530e046d0b72d55ffa06db19d75a34bb0 /float64.go | |
| parent | 41e9136667ee4f9ffd03da380e24629d7eccace4 (diff) | |
Do not append to default values in {String,Int}Slice
I added the ability to do: `-s=bob -s=john` and get `[]string{"bob", "john"}`
But if a default value was set to say `[]string{"eric"}` the above
operation was mistakenly resulting in: `[]string{"eric", "bob", "john"}
which was obviously not what was intended.
This is fixed by tracking if a value was parsed and overwriting the
default on the first time -s is found, but we append the 2+ time.
Diffstat (limited to 'float64.go')
0 files changed, 0 insertions, 0 deletions
