Skip to content

Unity-Technologies/go-countrycode

Repository files navigation

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.

About

Fast serialization and deserialization of country codes in go.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages