cast
cast copied to clipboard
fix ToUint64E and ToUint64 overflow, e.g. "18446744073709551615"(math.MaxUint64)
cast.ToUint64E("18446744073709551615") // math.MaxUint64 will get err about value out of range. For ToUint64E, using strconv.ParseUint instead of strconv.ParseInt.
@sagikazarmark
For code consistency, other uint cast methods are also changed to use strconv.ParseUint. tests look good.
@Imatvoid you need to cool off with these "mentions" (and emails).
ok
I saw this #140, but seemingly changing strconv.ParseUInt
to strconv.ParseInt
in the ToUint64E
method led to an overflow problem. Or is there something I understand wrong? I’m eager to receive feedback.
The problem is on our radar, but it's a little bit more complicated than that.
We will provide a solution. Until then, using a fork should be relatively easy in Go.
The problem is on our radar, but it's a little bit more complicated than that.
We will provide a solution. Until then, using a fork should be relatively easy in Go.
Thank you for your reply, actually, I'm interested in the "a little bit more complicated" problem. I will pay attention to the progress and try to learn something. It would be better if I could help.
The problem is on our radar, but it's a little bit more complicated than that.
We will provide a solution. Until then, using a fork should be relatively easy in Go.
Hi @sagikazarmark, any updates with this one?