cast
cast copied to clipboard
safe and easy casting from one type to another in Go
Would you consider NaN case behavior?
I like your project a lot. Although I know this project is dedicated to cast variables from one data type to another, it would be nice to have some helper...
When I cast a string with prefixed 0 like "0123" with cast.ToInt("0123"), it results into 83 instead of the expected 123 Example code: ```go package main import ( "fmt" "github.com/spf13/cast"...
Hi, It's a bit confusing to use inline json for map but having to use space separated items for slices. For consistency it would be great to also support inline...
You clam your library to be "safe casting from one type to another in Go", but in the code there are no checks for overflow when casting integer types: ```go...
It is already configure, but the repo owner must set the "switch".
Hey, thanks to `cast`. I found this library through [viper](https://github.com/spf13/viper). I use viper to read a JSON configuration. It works great so far. Viper has various support functions to get...
Signed-off-by: Yveshield If int type can be converted to bool type, why can't int8? and int16, etc.
This prevented me from using `0x9b199b1c002b4b00` as a cmd.Flags().Uint64 (which would return 0 as the value) ref https://github.com/spf13/cobra/issues/1791