Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Generic error for country code handling ErrCountryGENERIC = errors.New("issue with country codes") )
Functions ¶
func FindCountryA2CodeStr ¶
FindCountryA2CodeStr is a shortcut to quickly have an alpha 2 code from a code or translation
func SetNeededCountryCodes ¶
func SetNeededCountryCodes(alpha2Code ...string)
SetNeededCountryCodes is used to specify the country codes (FR, GB, IT, etc) that the application can restrict to
Types ¶
type CountryCode ¶
type CountryCode struct { Alpha2Code string Alpha3Code string NumCode int Translations map[Lang]*Translation }
CountryCode : a country code, with its translations
func FindCountryCode ¶
func FindCountryCode(codeOrTranslation string) *CountryCode
FindCountryCode retrieves a country code by a code or a translation
type Translation ¶
Translation helps keeping a translation for a given language
Click to show internal directories.
Click to hide internal directories.