countries.go 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. package countries
  2. var CountryContinent = map[string]string{
  3. "ad": "europe",
  4. "ae": "asia",
  5. "af": "asia",
  6. "ag": "north-america",
  7. "ai": "north-america",
  8. "al": "europe",
  9. "am": "asia",
  10. "an": "north-america",
  11. "ao": "africa",
  12. "ap": "asia",
  13. "aq": "antarctica",
  14. "ar": "south-america",
  15. "as": "oceania",
  16. "at": "europe",
  17. "au": "oceania",
  18. "aw": "north-america",
  19. "ax": "europe",
  20. "az": "asia",
  21. "ba": "europe",
  22. "bb": "north-america",
  23. "bd": "asia",
  24. "be": "europe",
  25. "bf": "africa",
  26. "bg": "europe",
  27. "bh": "asia",
  28. "bi": "africa",
  29. "bj": "africa",
  30. "bl": "north-america",
  31. "bm": "north-america",
  32. "bn": "asia",
  33. "bo": "south-america",
  34. "bq": "north-america",
  35. "br": "south-america",
  36. "bs": "north-america",
  37. "bt": "asia",
  38. "bv": "antarctica",
  39. "bw": "africa",
  40. "by": "europe",
  41. "bz": "north-america",
  42. "ca": "north-america",
  43. "cc": "asia",
  44. "cd": "africa",
  45. "cf": "africa",
  46. "cg": "africa",
  47. "ch": "europe",
  48. "ci": "africa",
  49. "ck": "oceania",
  50. "cl": "south-america",
  51. "cm": "africa",
  52. "cn": "asia",
  53. "co": "south-america",
  54. "cr": "north-america",
  55. "cu": "north-america",
  56. "cv": "africa",
  57. "cw": "north-america",
  58. "cx": "oceania",
  59. "cy": "europe",
  60. "cz": "europe",
  61. "de": "europe",
  62. "dj": "africa",
  63. "dk": "europe",
  64. "dm": "north-america",
  65. "do": "north-america",
  66. "dz": "africa",
  67. "ec": "south-america",
  68. "ee": "europe",
  69. "eg": "africa",
  70. "eh": "africa",
  71. "er": "africa",
  72. "es": "europe",
  73. "et": "africa",
  74. "eu": "europe",
  75. "fi": "europe",
  76. "fj": "oceania",
  77. "fk": "south-america",
  78. "fm": "oceania",
  79. "fo": "europe",
  80. "fr": "europe",
  81. "fx": "europe",
  82. "ga": "africa",
  83. "gb": "europe",
  84. "gd": "north-america",
  85. "ge": "asia",
  86. "gf": "south-america",
  87. "gg": "europe",
  88. "gh": "africa",
  89. "gi": "europe",
  90. "gl": "north-america",
  91. "gm": "africa",
  92. "gn": "africa",
  93. "gp": "north-america",
  94. "gq": "africa",
  95. "gr": "europe",
  96. "gs": "antarctica",
  97. "gt": "north-america",
  98. "gu": "oceania",
  99. "gw": "africa",
  100. "gy": "south-america",
  101. "hk": "asia",
  102. "hm": "antarctica",
  103. "hn": "north-america",
  104. "hr": "europe",
  105. "ht": "north-america",
  106. "hu": "europe",
  107. "id": "asia",
  108. "ie": "europe",
  109. "il": "asia",
  110. "im": "europe",
  111. "in": "asia",
  112. "io": "asia",
  113. "iq": "asia",
  114. "ir": "asia",
  115. "is": "europe",
  116. "it": "europe",
  117. "je": "europe",
  118. "jm": "north-america",
  119. "jo": "asia",
  120. "jp": "asia",
  121. "ke": "africa",
  122. "kg": "asia",
  123. "kh": "asia",
  124. "ki": "oceania",
  125. "km": "africa",
  126. "kn": "north-america",
  127. "kp": "asia",
  128. "kr": "asia",
  129. "kw": "asia",
  130. "ky": "north-america",
  131. "kz": "asia",
  132. "la": "asia",
  133. "lb": "asia",
  134. "lc": "north-america",
  135. "li": "europe",
  136. "lk": "asia",
  137. "lr": "africa",
  138. "ls": "africa",
  139. "lt": "europe",
  140. "lu": "europe",
  141. "lv": "europe",
  142. "ly": "africa",
  143. "ma": "africa",
  144. "mc": "europe",
  145. "md": "europe",
  146. "me": "europe",
  147. "mf": "north-america",
  148. "mg": "africa",
  149. "mh": "oceania",
  150. "mk": "europe",
  151. "ml": "africa",
  152. "mm": "asia",
  153. "mn": "asia",
  154. "mo": "asia",
  155. "mp": "oceania",
  156. "mq": "north-america",
  157. "mr": "africa",
  158. "ms": "north-america",
  159. "mt": "europe",
  160. "mu": "africa",
  161. "mv": "asia",
  162. "mw": "africa",
  163. "mx": "north-america",
  164. "my": "asia",
  165. "mz": "africa",
  166. "na": "africa",
  167. "nc": "oceania",
  168. "ne": "africa",
  169. "nf": "oceania",
  170. "ng": "africa",
  171. "ni": "north-america",
  172. "nl": "europe",
  173. "no": "europe",
  174. "np": "asia",
  175. "nr": "oceania",
  176. "nu": "oceania",
  177. "nz": "oceania",
  178. "om": "asia",
  179. "pa": "north-america",
  180. "pe": "south-america",
  181. "pf": "oceania",
  182. "pg": "oceania",
  183. "ph": "asia",
  184. "pk": "asia",
  185. "pl": "europe",
  186. "pm": "north-america",
  187. "pn": "oceania",
  188. "pr": "north-america",
  189. "ps": "asia",
  190. "pt": "europe",
  191. "pw": "oceania",
  192. "py": "south-america",
  193. "qa": "asia",
  194. "re": "africa",
  195. "ro": "europe",
  196. "rs": "europe",
  197. "ru": "europe",
  198. "rw": "africa",
  199. "sa": "asia",
  200. "sb": "oceania",
  201. "sc": "africa",
  202. "sd": "africa",
  203. "se": "europe",
  204. "sg": "asia",
  205. "sh": "africa",
  206. "si": "europe",
  207. "sj": "europe",
  208. "sk": "europe",
  209. "sl": "africa",
  210. "sm": "europe",
  211. "sn": "africa",
  212. "so": "africa",
  213. "sr": "south-america",
  214. "ss": "africa",
  215. "st": "africa",
  216. "sv": "north-america",
  217. "sx": "north-america",
  218. "sy": "asia",
  219. "sz": "africa",
  220. "tc": "north-america",
  221. "td": "africa",
  222. "tf": "antarctica",
  223. "tg": "africa",
  224. "th": "asia",
  225. "tj": "asia",
  226. "tk": "oceania",
  227. "tl": "oceania",
  228. "tm": "asia",
  229. "tn": "africa",
  230. "to": "oceania",
  231. "tr": "europe",
  232. "tt": "north-america",
  233. "tv": "oceania",
  234. "tw": "asia",
  235. "tz": "africa",
  236. "ua": "europe",
  237. "ug": "africa",
  238. "um": "oceania",
  239. "us": "north-america",
  240. "uy": "south-america",
  241. "uz": "asia",
  242. "va": "europe",
  243. "vc": "north-america",
  244. "ve": "south-america",
  245. "vg": "north-america",
  246. "vi": "north-america",
  247. "vn": "asia",
  248. "vu": "oceania",
  249. "wf": "oceania",
  250. "ws": "oceania",
  251. "xk": "europe",
  252. "ye": "asia",
  253. "yt": "africa",
  254. "za": "africa",
  255. "zm": "africa",
  256. "zw": "africa",
  257. }
  258. var ContinentCountries = map[string][]string{}
  259. func init() {
  260. for cc, co := range CountryContinent {
  261. if _, ok := ContinentCountries[co]; !ok {
  262. ContinentCountries[co] = []string{}
  263. }
  264. ContinentCountries[co] = append(ContinentCountries[co], cc)
  265. }
  266. }