Package Usage: go: github.com/cstockton/go-conv
Package conv provides fast and intuitive conversions across Go types.
All conversion functions accept any type of value for conversion, if unable
to find a reasonable conversion path they will return the target types zero
value and an error.
Numeric conversion from other numeric values of an identical type will be
returned without modification. Numeric conversions deviate slightly from Go
when dealing with under/over flow. When performing a conversion operation
that would overflow, we instead assign the maximum value for the target type.
Similarly, conversions that would underflow are assigned the minimun value
for that type, meaning unsigned integers are given zero values instead of
spilling into large positive integers.
In short, panics should not occur within this library under any circumstance.
This obviously excludes any oddities that may surface when the runtime is not
in a healthy state, i.e. uderlying system instability, memory exhaustion. If
you are able to create a reproducible panic please file a bug report.
1 version
Latest release: almost 4 years ago
58 dependent packages
View more package details: https://packages.ecosystem.code.gouv.fr/registries/proxy.golang.org/packages/github.com/cstockton/go-conv