Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Assignment ¶
type Assignment int
const ( /** * <a href="http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements" * >Officially assigned</a>. * * Assigned to a country, territory, or area of geographical interest. */ OFFICIALLY_ASSIGNED Assignment = iota /** * <a href="http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#User-assigned_code_elements" * >User assigned</a>. * * Free for assignment at the disposal of users. */ USER_ASSIGNED /** * <a href="http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Exceptional_reservations" * >Exceptionally reserved</a>. * * Reserved on request for restricted use. */ EXCEPTIONALLY_RESERVED /** * <a href="http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Transitional_reservations" * >Transitionally reserved</a>. * * Deleted from ISO 3166-1 but reserved transitionally. */ TRANSITIONALLY_RESERVED /** * <a href="http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Indeterminate_reservations" * >Indeterminately reserved</a>. * * Used in coding systems associated with ISO 3166-1. */ INDETERMINATELY_RESERVED /** * <a href="http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Codes_currently_agreed_not_to_use" * >Not used</a>. * * Not used in ISO 3166-1 in deference to international property * organization names. */ NOT_USED )
type CountryCode ¶
type CountryCode struct { Name string Alpha2 string Alpha3 string Numeric int DialingCode string Assignment Assignment }
func FindByName ¶
func FindByName(prefix string) (matches []CountryCode)
func GetByAlpha2 ¶
func GetByAlpha2(a2 string) (CountryCode, bool)
func GetByAlpha3 ¶
func GetByAlpha3(a3 string) (CountryCode, bool)
func GetByName ¶
func GetByName(name string) (CountryCode, bool)
func GetByNumeric ¶
func GetByNumeric(numeric int) (CountryCode, bool)
Click to show internal directories.
Click to hide internal directories.