Categorygithub.com/Unity-Technologies/go-countrycode
repositorypackage
1.0.0
Repository: https://github.com/unity-technologies/go-countrycode.git
Documentation: pkg.go.dev

# README

go-countrycode

CI status GoDoc

Package countrycode provides utilities for representing countries in code, and handling their serializations and deserializations in a convenient way.

All deserializations will result in CountryUndefined if input data is not a recognized country code.

All the exported types are one word in memory and as such provide fast equality checks, hashing for usage as keys in maps. Conversions between the types are zero overhead (don't even escape the stack), serialization is worst case O(1), and deserialization is worst case O(n).

License

MIT License. See LICENSE for more details.