feat!: add more integers and unsigned integers#2094
Conversation
6860a88 to
bb0cbe7
Compare
|
@somebadcode Can you run |
57dcf48 to
c11b9b2
Compare
|
@dearchap I've addressed the things you pointed out and I've added basic tests for all the new flag types. |
|
This change is breaking again, right? I'm wondering about how this will be released. Will we see v4 soon? |
Yes, it's breaking since it changes I was a bit too slow to make it to the v3 release. I initially hoped that they'd held back the release of v3 because of these mistakes since the use of generics makes is really easy to cover all the different integers and floats. So maybe correcting these short-comings will cause a v4 in a not too distant future? |
|
Yes breaking change. Can't help it. |
5c53cb1 to
ff934ef
Compare
|
@somebadcode Final request. There are 2 spots not covered by any tests. Not sure why flag_uint.go#L55-L59 and L61 . Basically the String() function of uintValue[T]. Not sure why its not covered since we have Uint.String() tests in flag_test.go(see TestUintFlagXXX functions). Can you fix that ? |
ff934ef to
a173a2f
Compare
* Reintroduced all variants of integers and unsigned integers. * Fixed the use of base by using `IntegerConfig.Base` and defaulting to base 10 when formatting. Fixes: urfave#2050 Signed-off-by: Tobias Dahlberg <lokskada@live.se>
* `extFlag.PreParse()` will set the value to that of `flag.DefValue`.
a173a2f to
9bb00e2
Compare
|
Awesome @somebadcode . Thank you so much. |
Fixes: #2050
What type of PR is this?
What this PR does / why we need it:
Only having flags for
int64anduint64when generics can be used to make it support all of them is very limiting and forces the users of the package to create wrappers if the variable that they want to configure using a flag is not part of their project or adds unnecessary bloat by having less appropriate integer types and conversions of those integers.Which issue(s) this PR fixes:
Fixes #2050
Release Notes
(REQUIRED)