-
-
Notifications
You must be signed in to change notification settings - Fork 72
/
countries.go
6032 lines (5992 loc) · 121 KB
/
countries.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Package countries - ISO 3166 (ISO3166-1, ISO3166, Digit, Alpha-2 and Alpha-3) countries codes and names (on eng and rus), ISO 4217 currency designators, ITU-T E.164 IDD calling phone codes, countries capitals, UN M.49 regions codes, ccTLD countries domains, IOC/NOC and FIFA letters codes, VERY FAST, NO maps[], NO slices[], NO external links/files/data, NO interface{}, NO specific dependencies, Databases compatible, Emoji countries flags and currencies support, full support ISO-3166-1, ISO-4217, ITU-T E.164, Unicode CLDR and ccTLD standarts. Full support ISO-3166-1, ISO-4217, ITU-T E.164, Unicode CLDR and ccTLD standarts.
/*
Package countries - ISO 3166 (ISO3166-1, ISO3166, Digit, Alpha-2 and Alpha-3) countries codes and names (on eng and rus), ISO 4217 currency designators, ITU-T E.164 IDD calling phone codes, countries capitals, UN M.49 regions codes, ccTLD countries domains, IOC/NOC and FIFA letters codes, VERY FAST, NO maps[], NO slices[], NO external links/files/data, NO interface{}, NO specific dependencies, Databases compatible, Emoji countries flags and currencies support, full support ISO-3166-1, ISO-4217, ITU-T E.164, Unicode CLDR and ccTLD standarts.
Full support ISO-3166-1, ISO-4217, ITU-T E.164, Unicode CLDR and ccTLD standarts.
Usage
func main() {
countryJapan := countries.Japan
fmt.Printf("Country name in english: %v\n", countryJapan) // Japan
fmt.Printf("Country name in russian: %v\n", countryJapan.StringRus()) // Япония
fmt.Printf("Country ISO-3166 digit code: %d\n", countryJapan) // 392
fmt.Printf("Country ISO-3166 Alpha-2 code: %v\n", countryJapan.Alpha2()) // JP
fmt.Printf("Country ISO-3166 Alpha-3 code: %v\n", countryJapan.Alpha3()) // JPN
fmt.Printf("Country IOC/NOC code: %v\n", countryJapan.IOC()) // JPN
fmt.Printf("Country FIFA code: %v\n", countryJapan.FIFA()) // JPN
fmt.Printf("Country Capital: %v\n", countryJapan.Capital()) // Tokyo
fmt.Printf("Country ITU-T E.164 call code: %v\n", countryJapan.CallCodes()) // +81
fmt.Printf("Country ccTLD domain: %v\n", countryJapan.Domain()) // .jp
fmt.Printf("Country UN M.49 region name: %v\n", countryJapan.Region()) // Asia
fmt.Printf("Country UN M.49 region code: %d\n", countryJapan.Region()) // 142
fmt.Printf("Country emoji/flag: %v\n", countryJapan.Emoji()) // 🇯🇵
fmt.Printf("Country Subdivisions: %v\n", countryJapan.Subdivisions()) // Hokkaido Aomori Iwate Miyagi Akita Yamagata Fukushima Ibaraki Tochigi Gunma Saitama Chiba Tokyo Kanagawa Niigata Toyama Ishikawa Fukui Yamanashi Nagano Gifu Shizuoka Aichi Mie Shiga Kyoto Osaka Hyogo Nara Wakayama Tottori Shimane Okayama Hiroshima Yamaguchi Tokushima Kagawa Ehime Kochi Fukuoka Saga Nagasaki Kumamoto Oita Miyazaki Kagoshima Okinawa
currencyJapan := countryJapan.Currency()
fmt.Printf("Country ISO-4217 Currency name in english: %v\n", currencyJapan) // Yen
fmt.Printf("Country ISO-4217 Currency digit code: %d\n", currencyJapan) // 392
fmt.Printf("Country ISO-4217 Currency Alpha code: %v\n", currencyJapan.Alpha()) // JPY
fmt.Printf("Country Currency emoji: %v\n", currencyJapan.Emoji()) // 💴
fmt.Printf("Country of Currency %v: %v\n", currencyJapan, currencyJapan.Countries()) // Japan
// OR you can alternative use:
japanInfo := countries.Japan.Info()
fmt.Printf("Country name in english: %v\n", japanInfo.Name) // Japan
fmt.Printf("Country ISO-3166 digit code: %d\n", japanInfo.Code) // 392
fmt.Printf("Country ISO-3166 Alpha-2 code: %v\n", japanInfo.Alpha2) // JP
fmt.Printf("Country ISO-3166 Alpha-3 code: %v\n", japanInfo.Alpha3) // JPN
fmt.Printf("Country IOC/NOC code: %v\n", japanInfo.IOC) // JPN
fmt.Printf("Country FIFA code: %v\n", japanInfo.FIFA) // JPN
fmt.Printf("Country Capital: %v\n", japanInfo.Capital) // Tokyo
fmt.Printf("Country ITU-T E.164 call code: %v\n", japanInfo.CallCodes) // +81
fmt.Printf("Country ccTLD domain: %v\n", japanInfo.Domain) // .jp
fmt.Printf("Country UN M.49 region name: %v\n", japanInfo.Region) // Asia
fmt.Printf("Country UN M.49 region code: %d\n", japanInfo.Region) // 142
fmt.Printf("Country emoji/flag: %v\n", japanInfo.Emoji) // 🇯🇵
fmt.Printf("Country ISO-4217 Currency name in english: %v\n", japanInfo.Currency) // Yen
fmt.Printf("Country ISO-4217 Currency digit code: %d\n", japanInfo.Currency) // 392
fmt.Printf("Country ISO-4217 Currency Alpha code: %v\n", japanInfo.Currency.Alpha()) // JPY
fmt.Printf("Country Subdivisions: %v\n", japanInfo.Subdivisions) // Hokkaido Aomori Iwate Miyagi Akita Yamagata Fukushima Ibaraki Tochigi Gunma Saitama Chiba Tokyo Kanagawa Niigata Toyama Ishikawa Fukui Yamanashi Nagano Gifu Shizuoka Aichi Mie Shiga Kyoto Osaka Hyogo Nara Wakayama Tottori Shimane Okayama Hiroshima Yamaguchi Tokushima Kagawa Ehime Kochi Fukuoka Saga Nagasaki Kumamoto Oita Miyazaki Kagoshima Okinawa
// Detection usage
// Detect by name
country := countries.ByName("angola")
fmt.Printf("Country name in english: %v\n", country) // Angola
fmt.Printf("Country ISO-3166 digit code: %d\n", country) // 24
fmt.Printf("Country ISO-3166 Alpha-2 code: %v\n", country.Alpha2()) // AO
fmt.Printf("Country ISO-3166 Alpha-3 code: %v\n", country.Alpha3()) // AGO
// Detect by code/numeric
country = countries.ByNumeric(24)
fmt.Printf("Country name in english: %v\n", country) // Angola
fmt.Printf("Country ISO-3166 digit code: %d\n", country) // 24
fmt.Printf("Country ISO-3166 Alpha-2 code: %v\n", country.Alpha2()) // AO
fmt.Printf("Country ISO-3166 Alpha-3 code: %v\n", country.Alpha3()) // AGO
// Comparing usage
// Compare by code/numeric
if countries.ByName("angola") == countries.AGO {
fmt.Println("Yes! It's Angola!") // Yes! It's Angola!
}
// Compare by name
if strings.EqualFold("angola", countries.AGO.String()) {
fmt.Println("Yes! It's Angola!") // Yes! It's Angola!
}
// Database usage
type User struct {
gorm.Model
Name string
Country countries.CountryCode
Currency countries.CurrencyCode
}
user := &User{Name: "Helen", Country: countries.Slovenia, Currency: countries.CurrencyEUR}
db, err := gorm.Open("postgres", 500, "host=127.0.0.2 port=5432 user=usr password=1234567 dbname=db")
if err != nil {
panic(err)
}
defer db.Close()
db.Create(user)
}
Contributing
Welcome pull requests, bug fixes and issue reports.
Before proposing a change, please discuss it first by raising an issue. */
// Package countries - ISO 3166 (ISO3166-1, ISO3166, Digit, Alpha-2 and Alpha-3) countries codes and names (on eng and rus), ISO 4217 currency designators, ITU-T E.164 IDD calling phone codes, countries capitals, UN M.49 regions codes, ccTLD countries domains, IOC/NOC and FIFA letters codes, VERY FAST, NO maps[], NO slices[], NO external links/files/data, NO interface{}, NO specific dependencies, Databases compatible, Emoji countries flags and currencies support, full support ISO-3166-1, ISO-4217, ITU-T E.164, Unicode CLDR and ccTLD standarts. Full support ISO-3166-1, ISO-4217, ITU-T E.164, Unicode CLDR and ccTLD standarts.
//nolint:misspell
package countries //nolint:misspell
import (
"encoding/json"
"fmt"
)
// CountryCode - country code (254 countries). Three codes present, for example Russia == RU == RUS == 643.
type CountryCode int64 // int64 for database/sql/driver.Valuer compatibility
// Country - all info about country
type Country struct {
Name string `json:"name"`
Alpha2 string `json:"cca2"`
Alpha3 string `json:"cca3"`
FIPS string `json:"fips"`
IOC string `json:"ioc"`
FIFA string `json:"fifa"`
Emoji string `json:"emoji"`
Code CountryCode `json:"code"`
Currency CurrencyCode `json:"currency"`
Capital CapitalCode `json:"capital"`
CallCodes []CallCode `json:"callingCode"`
Domain DomainCode `json:"domain"`
Region RegionCode `json:"region"`
Subdivisions []SubdivisionCode `json:"subdivisionCodes"`
}
// Typer - typer interface, provide a name of type
type Typer interface {
Type() string
}
// Total - returns number of codes in the package, countries.Total() == len(countries.All()) but static value for performance
func Total() int {
return 252
}
// Emoji - return a country Alpha-2 (ISO2) as Emoji flag (example "RU" as "🇷🇺")
func (c CountryCode) Emoji() string {
iso2 := c.Alpha2()
buf := [...]byte{240, 159, 135, 0, 240, 159, 135, 0}
buf[3] = iso2[0] + (166 - 'A')
buf[7] = iso2[1] + (166 - 'A')
return string(buf[:])
}
// Emoji3 - return a country Alpha-3 (ISO3) as Emoji (example "RUS" as "🇷🇺🇸")
func (c CountryCode) Emoji3() string {
iso3 := c.Alpha3()
buf := [...]byte{240, 159, 135, 0, 240, 159, 135, 0, 240, 159, 135, 0}
buf[3] = iso3[0] + (166 - 'A')
buf[7] = iso3[1] + (166 - 'A')
buf[11] = iso3[2] + (166 - 'A')
return string(buf[:])
}
// Type implements Typer interface.
func (_ CountryCode) Type() string {
return TypeCountryCode
}
// String - implements fmt.Stringer, returns a english name of country
//
//nolint:gocyclo
func (c CountryCode) String() string { //nolint:gocyclo
switch c {
case 8:
return "Albania"
case 12:
return "Algeria"
case 16:
return "American Samoa"
case 20:
return "Andorra"
case 24:
return "Angola"
case 660:
return "Anguilla"
case 10:
return "Antarctica"
case 28:
return "Antigua and Barbuda"
case 32:
return "Argentina"
case 51:
return "Armenia"
case 533:
return "Aruba"
case 36:
return "Australia"
case 40:
return "Austria"
case 31:
return "Azerbaijan"
case 44:
return "Bahamas"
case 48:
return "Bahrain"
case 50:
return "Bangladesh"
case 52:
return "Barbados"
case 112:
return "Belarus"
case 56:
return "Belgium"
case 84:
return "Belize"
case 204:
return "Benin"
case 60:
return "Bermuda"
case 64:
return "Bhutan"
case 68:
return "Bolivia"
case 70:
return "Bosnia and Herzegovina"
case 72:
return "Botswana"
case 74:
return "Bouvet Island"
case 76:
return "Brazil"
case 86:
return "British Indian Ocean Territory"
case 96:
return "Brunei Darussalam"
case 100:
return "Bulgaria"
case 854:
return "Burkina Faso"
case 108:
return "Burundi"
case 116:
return "Cambodia"
case 120:
return "Cameroon"
case 124:
return "Canada"
case 132:
return "Cape Verde"
case 136:
return "Cayman Islands"
case 140:
return "Central African Republic"
case 148:
return "Chad"
case 152:
return "Chile"
case 156:
return "China"
case 162:
return "Christmas Island"
case 166:
return "Cocos (Keeling) Islands"
case 170:
return "Colombia"
case 174:
return "Comoros"
case 178:
return "Congo"
case 180:
return "Democratic Republic of the Congo"
case 184:
return "Cook Islands"
case 188:
return "Costa Rica"
case 384:
return "Cote d'Ivoire" // Ivory Coast
case 191:
return "Croatia"
case 192:
return "Cuba"
case 196:
return "Cyprus"
case 203:
return "Czechia"
case 208:
return "Denmark"
case 262:
return "Djibouti"
case 212:
return "Dominica"
case 214:
return "Dominican Republic"
case 218:
return "Ecuador"
case 818:
return "Egypt"
case 222:
return "El Salvador"
case 226:
return "Equatorial Guinea"
case 232:
return "Eritrea"
case 233:
return "Estonia"
case 231:
return "Ethiopia"
case 234:
return "Faroe Islands"
case 238:
return "Falkland Islands (Malvinas)"
case 242:
return "Fiji"
case 246:
return "Finland"
case 250:
return "France"
case 254:
return "French Guiana"
case 258:
return "French Polynesia"
case 260:
return "French Southern Territories"
case 266:
return "Gabon"
case 270:
return "Gambia"
case 268:
return "Georgia"
case 276:
return "Germany"
case 288:
return "Ghana"
case 292:
return "Gibraltar"
case 300:
return "Greece"
case 304:
return "Greenland"
case 308:
return "Grenada"
case 312:
return "Guadeloupe"
case 316:
return "Guam"
case 320:
return "Guatemala"
case 324:
return "Guinea"
case 624:
return "Guinea-Bissau"
case 328:
return "Guyana"
case 332:
return "Haiti"
case 334:
return "Heard Island and McDonald Islands"
case 340:
return "Honduras"
case 344:
return "Hong Kong (Special Administrative Region of China)"
case 348:
return "Hungary"
case 352:
return "Iceland"
case 356:
return "India"
case 360:
return "Indonesia"
case 364:
return "Iran (Islamic Republic of)"
case 368:
return "Iraq"
case 372:
return "Ireland"
case 376:
return "Israel"
case 380:
return "Italy"
case 388:
return "Jamaica"
case 392:
return "Japan"
case 400:
return "Jordan"
case 398:
return "Kazakhstan"
case 404:
return "Kenya"
case 296:
return "Kiribati"
case 410:
return "Republic of Korea"
case 408:
return "Democratic People's Republic of Korea"
case 414:
return "Kuwait"
case 417:
return "Kyrgyzstan"
case 418:
return "Lao People's Democratic Republic"
case 428:
return "Latvia"
case 422:
return "Lebanon"
case 426:
return "Lesotho"
case 430:
return "Liberia"
case 434:
return "Libyan Arab Jamahiriya"
case 438:
return "Liechtenstein"
case 440:
return "Lithuania"
case 442:
return "Luxembourg"
case 446:
return "Macau (Special Administrative Region of China)"
case 807:
return "North Macedonia (Republic of North Macedonia)"
case 450:
return "Madagascar"
case 454:
return "Malawi"
case 458:
return "Malaysia"
case 462:
return "Maldives"
case 466:
return "Mali"
case 470:
return "Malta"
case 584:
return "Marshall Islands"
case 474:
return "Martinique"
case 478:
return "Mauritania"
case 480:
return "Mauritius"
case 175:
return "Mayotte"
case 484:
return "Mexico"
case 583:
return "Micronesia (Federated States of)"
case 498:
return "Moldova (Republic of)"
case 492:
return "Monaco"
case 496:
return "Mongolia"
case 500:
return "Montserrat"
case 504:
return "Morocco"
case 508:
return "Mozambique"
case 104:
return "Myanmar"
case 516:
return "Namibia"
case 520:
return "Nauru"
case 524:
return "Nepal"
case 528:
return "Netherlands"
case 530:
return "Netherlands Antilles"
case 540:
return "New Caledonia"
case 554:
return "New Zealand"
case 558:
return "Nicaragua"
case 562:
return "Niger"
case 566:
return "Nigeria"
case 570:
return "Niue"
case 574:
return "Norfolk Island"
case 580:
return "Northern Mariana Islands"
case 578:
return "Norway"
case 512:
return "Oman"
case 586:
return "Pakistan"
case 585:
return "Palau"
case 275:
return "Palestinian Territory (Occupied)"
case 591:
return "Panama"
case 598:
return "Papua New Guinea"
case 600:
return "Paraguay"
case 604:
return "Peru"
case 608:
return "Philippines"
case 612:
return "Pitcairn"
case 616:
return "Poland"
case 620:
return "Portugal"
case 630:
return "Puerto Rico"
case 634:
return "Qatar"
case 638:
return "Reunion"
case 642:
return "Romania"
case 643:
return "Russian Federation"
case 646:
return "Rwanda"
case 654:
return "Saint Helena"
case 659:
return "Saint Kitts and Nevis"
case 662:
return "Saint Lucia"
case 666:
return "Saint Pierre and Miquelon"
case 670:
return "Saint Vincent and the Grenadines"
case 882:
return "Samoa"
case 674:
return "San Marino"
case 678:
return "Sao Tome and Principe"
case 682:
return "Saudi Arabia"
case 686:
return "Senegal"
case 690:
return "Seychelles"
case 694:
return "Sierra Leone"
case 702:
return "Singapore"
case 703:
return "Slovakia"
case 705:
return "Slovenia"
case 90:
return "Solomon Islands"
case 706:
return "Somalia"
case 710:
return "South Africa"
case 239:
return "South Georgia and The South Sandwich Islands"
case 724:
return "Spain"
case 144:
return "Sri Lanka"
case 729:
return "Sudan"
case 740:
return "Suriname"
case 744:
return "Svalbard and Jan Mayen Islands"
case 748:
return "Swaziland"
case 752:
return "Sweden"
case 756:
return "Switzerland"
case 760:
return "Syrian Arab Republic"
case 158:
return "Taiwan (Province of China)"
case 762:
return "Tajikistan"
case 834:
return "Tanzania (United Republic of)"
case 764:
return "Thailand"
case 626:
return "Timor-Leste (East Timor)"
case 768:
return "Togo"
case 772:
return "Tokelau"
case 776:
return "Tonga"
case 780:
return "Trinidad and Tobago"
case 788:
return "Tunisia"
case 792:
return "Turkey"
case 795:
return "Turkmenistan"
case 796:
return "Turks and Caicos Islands"
case 798:
return "Tuvalu"
case 800:
return "Uganda"
case 804:
return "Ukraine"
case 784:
return "United Arab Emirates"
case 826:
return "United Kingdom"
case 840:
return "United States"
case 581:
return "United States Minor Outlying Islands"
case 858:
return "Uruguay"
case 860:
return "Uzbekistan"
case 548:
return "Vanuatu"
case 336:
return "Holy See (Vatican City State)"
case 862:
return "Venezuela"
case 704:
return "Vietnam"
case 92:
return "Virgin Islands British"
case 850:
return "Virgin Islands US"
case 876:
return "Wallis and Futuna Islands"
case 732:
return "Western Sahara"
case 887:
return "Yemen"
case 891:
return "Yugoslavia"
case 894:
return "Zambia"
case 716:
return "Zimbabwe"
case 4:
return "Afghanistan"
case 688:
return "Serbia"
case 248:
return "Aland Islands"
case 535:
return "Bonaire, Sint Eustatius And Saba"
case 831:
return "Guernsey"
case 832:
return "Jersey"
case 531:
return "Curacao"
case 833:
return "Isle Of Man"
case 652:
return "Saint Barthelemy"
case 663:
return "Saint Martin French"
case 534:
return "Sint Maarten Dutch"
case 499:
return "Montenegro"
case 728:
return "South Sudan"
case 900:
return "Kosovo"
case 998:
return "None"
case 999:
return "International"
case 999800:
return "International Freephone"
case 999870:
return "Inmarsat"
case 999875:
return "Maritime Mobile service"
case 999878:
return "Universal Personal Telecommunications services"
case 999879:
return "National non-commercial purposes"
case 999881:
return "Global Mobile Satellite System"
case 999882:
return "International Networks"
case 999888:
return "Disaster Relief"
case 999979:
return "International Premium Rate Service"
case 999991:
return "International Telecommunications Public Correspondence Service"
}
return UnknownMsg
}
// StringRus - returns a russian name of country
//
//nolint:gocyclo
func (c CountryCode) StringRus() string { //nolint:gocyclo
switch c {
case 8:
return "Албания"
case 12:
return "Алжир"
case 16:
return "Американский Самоа"
case 20:
return "Андорра"
case 24:
return "Ангола"
case 660:
return "Ангилья"
case 10:
return "Антарктика"
case 28:
return "Антигуа и Барбуда"
case 32:
return "Аргентина"
case 51:
return "Армения"
case 533:
return "Аруба"
case 36:
return "Австралия"
case 40:
return "Австрия"
case 31:
return "Азербайджан"
case 44:
return "Багамские острова"
case 48:
return "Бахрейн"
case 50:
return "Бангладеш"
case 52:
return "Барбадос"
case 112:
return "Беларусь"
case 56:
return "Бельгия"
case 84:
return "Белиз"
case 204:
return "Бенин"
case 60:
return "Бермуды"
case 64:
return "Бутан"
case 68:
return "Боливия"
case 70:
return "Босния и Герцеговина"
case 72:
return "Ботсвана"
case 74:
return "остров Буве"
case 76:
return "Бразилия"
case 86:
return "Британские территории Индийского океана"
case 96:
return "Бруней"
case 100:
return "Болгария"
case 108:
return "Бурунди"
case 116:
return "Камбоджа"
case 120:
return "Камерун"
case 124:
return "Канада"
case 132:
return "острова Зеленого Мыса"
case 136:
return "Каймановы острова"
case 140:
return "Центральная Африканская Республика"
case 144:
return "Шри Ланка"
case 148:
return "Чад"
case 152:
return "Чили"
case 156:
return "Китайская Народная Республика"
case 162:
return "остров Рождества"
case 166:
return "Кокосовые острова"
case 170:
return "Колумбия"
case 174:
return "Коморские острова"
case 178:
return "Конго"
case 180:
return "Демократическая республика Конго"
case 184:
return "острова Кука"
case 188:
return "Коста Рика"
case 384:
return "Кот-д'Ивуар"
case 191:
return "Хорватия"
case 192:
return "Куба"
case 196:
return "Кипр"
case 203:
return "Чехия"
case 208:
return "Дания"
case 262:
return "Джибути"
case 212:
return "Доминика"
case 214:
return "Доминиканская республика"
case 218:
return "Эквадор"
case 818:
return "Египет"
case 222:
return "Сальвадор"
case 226:
return "Экваториальная Гвинея"
case 232:
return "Эритрея"
case 233:
return "Эстония"
case 231:
return "Эфиопия"
case 234:
return "Фарерские острова"
case 238:
return "Фолклендские (Мальвинские) острова"
case 242:
return "Фиджи"
case 246:
return "Финляндия"
case 250:
return "Франция"
case 254:
return "Французская Гвиана"
case 258:
return "Французская Полинезия"
case 260:
return "Французские Южные Территории"
case 266:
return "Габон"
case 270:
return "Гамбия"
case 268:
return "Грузия"
case 276:
return "Германия"
case 288:
return "Гана"
case 292:
return "Гибралтар"
case 300:
return "Греция"
case 304:
return "Гренландия"
case 308:
return "Гренада"
case 312:
return "Гваделупа"
case 316:
return "Гуам"
case 320:
return "Гватемала"
case 324:
return "Гвинея"
case 624:
return "Гвинея-Бисау"
case 328:
return "Гайана"
case 332:
return "Гаити"
case 334:
return "острова Герда и МакДональда"
case 340:
return "Гондурас"
case 344:
return "Гонконг (Китай)"
case 348:
return "Венгрия"
case 352:
return "Исландия"
case 356:
return "Индия"
case 360:
return "Индонезия"
case 364:
return "Иран"
case 368:
return "Ирак"
case 372:
return "Ирландия"
case 376:
return "Израиль"
case 380:
return "Италия"
case 388:
return "Ямайка"
case 392:
return "Япония"
case 400:
return "Иордания"
case 398:
return "Казахстан"
case 404:
return "Кения"
case 296:
return "Кирибати"
case 410:
return "Корея"
case 408:
return "Корейская Народная Демократическая республика"
case 414:
return "Кувейт"
case 417:
return "Кыргызстан" // Киргизия
case 418:
return "Лаос"
case 428:
return "Латвия"
case 422:
return "Ливан"
case 426:
return "Лесото"
case 430:
return "Либерия"
case 434:
return "Ливия"
case 438:
return "Лихтенштейн"
case 440:
return "Литва"
case 442:
return "Люксембург"
case 446:
return "Макао (Китай)"
case 807:
return "Македония"
case 450:
return "Мадагаскар"
case 454:
return "Малави"
case 458:
return "Малайзия"
case 462:
return "Мальдивские острова"
case 466:
return "Мали"
case 470:
return "Мальта"
case 584:
return "Маршалловы острова"
case 474:
return "Мартиника"
case 478:
return "Мавритания"
case 480:
return "Маврикий"
case 175:
return "Майотта"
case 484:
return "Мексика"
case 583:
return "Микронезия"
case 498:
return "Молдова"
case 492:
return "Монако"
case 496:
return "Монголия"
case 500:
return "Монтсеррат"
case 504:
return "Марокко"
case 508:
return "Мозамбик"
case 104:
return "Мьянма"
case 516:
return "Намибия"
case 520:
return "Науру"
case 524:
return "Непал"
case 528:
return "Нидерланды"
case 530:
return "Антильские острова"
case 540:
return "Новая Каледония"