Cast for Go
Convert dynamically shaped values into common Go types.
spf13 · Code and testing
GitHub projectOpen source Open on GitHubHow to try it
In a new Go module, add github.com/spf13/cast at v1.10.0. Read a fictional count written as text and check the invalid case.
What we tested
v1.10.0. Read a fictional count written as text and check the invalid case. Converted the sample numeric string and rejected the nonnumeric label.