-
Notifications
You must be signed in to change notification settings - Fork 2
/
std.go
790 lines (777 loc) · 19.6 KB
/
std.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
package currency
/*-------------------------------+
| Code generated by std_currency |
| DO NOT EDIT |
+-------------------------------*/
import (
"fmt"
"strings"
)
// Currency defines a currency containing
// It's code, taken from the constants above
// as well as it's minor units, as an integer.
type Currency struct {
code string
minorUnits int
factor int
}
// Code returns the currency code to the user
func (c Currency) Code() string { return c.code }
// MinorUnits returns the minor unit to the user
func (c Currency) MinorUnits() int { return c.minorUnits }
// Factor returns the factor by which a float should be multiplied
// to get back to it's smallest denomination
//
// Example:
// pence := 100.00 * currency.GBP.Factor()
func (c Currency) Factor() int { return c.factor }
// FactorAsInt64 returns the factor, converted to a int64
func (c Currency) FactorAsInt64() int64 { return int64(c.factor) }
// FactorAsFloat64 returns the factor, converted to a float64
func (c Currency) FactorAsFloat64() float64 { return float64(c.factor) }
// Get returns a currency struct if the provided
// code is contained within the valid codes. Otherwise
// an error will be returned
func Get(code string) (Currency, error) {
if Valid(code) {
val, ok := currencies[code]
if ok {
return val, nil
}
}
return Currency{}, fmt.Errorf("currency: could not find currency with code: %q", code)
}
// Valid checks if a provided code is contained
// inside the provided ValidCodes slice
func Valid(code string) bool {
for _, c := range ValidCodes {
if strings.EqualFold(c, code) {
return true
}
}
return false
}
// Following are all the structs containing currency data
var (
// AED currency struct
AED = Currency{code: "AED", minorUnits: 2, factor: 100}
// AFN currency struct
AFN = Currency{code: "AFN", minorUnits: 2, factor: 100}
// ALL currency struct
ALL = Currency{code: "ALL", minorUnits: 2, factor: 100}
// AMD currency struct
AMD = Currency{code: "AMD", minorUnits: 2, factor: 100}
// ANG currency struct
ANG = Currency{code: "ANG", minorUnits: 2, factor: 100}
// AOA currency struct
AOA = Currency{code: "AOA", minorUnits: 2, factor: 100}
// ARS currency struct
ARS = Currency{code: "ARS", minorUnits: 2, factor: 100}
// AUD currency struct
AUD = Currency{code: "AUD", minorUnits: 2, factor: 100}
// AWG currency struct
AWG = Currency{code: "AWG", minorUnits: 2, factor: 100}
// AZN currency struct
AZN = Currency{code: "AZN", minorUnits: 2, factor: 100}
// BAM currency struct
BAM = Currency{code: "BAM", minorUnits: 2, factor: 100}
// BBD currency struct
BBD = Currency{code: "BBD", minorUnits: 2, factor: 100}
// BDT currency struct
BDT = Currency{code: "BDT", minorUnits: 2, factor: 100}
// BGN currency struct
BGN = Currency{code: "BGN", minorUnits: 2, factor: 100}
// BHD currency struct
BHD = Currency{code: "BHD", minorUnits: 3, factor: 1000}
// BIF currency struct
BIF = Currency{code: "BIF", minorUnits: 0, factor: 1}
// BMD currency struct
BMD = Currency{code: "BMD", minorUnits: 2, factor: 100}
// BND currency struct
BND = Currency{code: "BND", minorUnits: 2, factor: 100}
// BOB currency struct
BOB = Currency{code: "BOB", minorUnits: 2, factor: 100}
// BOV currency struct
BOV = Currency{code: "BOV", minorUnits: 2, factor: 100}
// BRL currency struct
BRL = Currency{code: "BRL", minorUnits: 2, factor: 100}
// BSD currency struct
BSD = Currency{code: "BSD", minorUnits: 2, factor: 100}
// BTN currency struct
BTN = Currency{code: "BTN", minorUnits: 2, factor: 100}
// BWP currency struct
BWP = Currency{code: "BWP", minorUnits: 2, factor: 100}
// BYN currency struct
BYN = Currency{code: "BYN", minorUnits: 2, factor: 100}
// BZD currency struct
BZD = Currency{code: "BZD", minorUnits: 2, factor: 100}
// CAD currency struct
CAD = Currency{code: "CAD", minorUnits: 2, factor: 100}
// CDF currency struct
CDF = Currency{code: "CDF", minorUnits: 2, factor: 100}
// CHE currency struct
CHE = Currency{code: "CHE", minorUnits: 2, factor: 100}
// CHF currency struct
CHF = Currency{code: "CHF", minorUnits: 2, factor: 100}
// CHW currency struct
CHW = Currency{code: "CHW", minorUnits: 2, factor: 100}
// CLF currency struct
CLF = Currency{code: "CLF", minorUnits: 4, factor: 10000}
// CLP currency struct
CLP = Currency{code: "CLP", minorUnits: 0, factor: 1}
// CNY currency struct
CNY = Currency{code: "CNY", minorUnits: 2, factor: 100}
// COP currency struct
COP = Currency{code: "COP", minorUnits: 2, factor: 100}
// COU currency struct
COU = Currency{code: "COU", minorUnits: 2, factor: 100}
// CRC currency struct
CRC = Currency{code: "CRC", minorUnits: 2, factor: 100}
// CUC currency struct
CUC = Currency{code: "CUC", minorUnits: 2, factor: 100}
// CUP currency struct
CUP = Currency{code: "CUP", minorUnits: 2, factor: 100}
// CVE currency struct
CVE = Currency{code: "CVE", minorUnits: 2, factor: 100}
// CZK currency struct
CZK = Currency{code: "CZK", minorUnits: 2, factor: 100}
// DJF currency struct
DJF = Currency{code: "DJF", minorUnits: 0, factor: 1}
// DKK currency struct
DKK = Currency{code: "DKK", minorUnits: 2, factor: 100}
// DOP currency struct
DOP = Currency{code: "DOP", minorUnits: 2, factor: 100}
// DZD currency struct
DZD = Currency{code: "DZD", minorUnits: 2, factor: 100}
// EGP currency struct
EGP = Currency{code: "EGP", minorUnits: 2, factor: 100}
// ERN currency struct
ERN = Currency{code: "ERN", minorUnits: 2, factor: 100}
// ETB currency struct
ETB = Currency{code: "ETB", minorUnits: 2, factor: 100}
// EUR currency struct
EUR = Currency{code: "EUR", minorUnits: 2, factor: 100}
// FJD currency struct
FJD = Currency{code: "FJD", minorUnits: 2, factor: 100}
// FKP currency struct
FKP = Currency{code: "FKP", minorUnits: 2, factor: 100}
// GBP currency struct
GBP = Currency{code: "GBP", minorUnits: 2, factor: 100}
// GEL currency struct
GEL = Currency{code: "GEL", minorUnits: 2, factor: 100}
// GHS currency struct
GHS = Currency{code: "GHS", minorUnits: 2, factor: 100}
// GIP currency struct
GIP = Currency{code: "GIP", minorUnits: 2, factor: 100}
// GMD currency struct
GMD = Currency{code: "GMD", minorUnits: 2, factor: 100}
// GNF currency struct
GNF = Currency{code: "GNF", minorUnits: 0, factor: 1}
// GTQ currency struct
GTQ = Currency{code: "GTQ", minorUnits: 2, factor: 100}
// GYD currency struct
GYD = Currency{code: "GYD", minorUnits: 2, factor: 100}
// HKD currency struct
HKD = Currency{code: "HKD", minorUnits: 2, factor: 100}
// HNL currency struct
HNL = Currency{code: "HNL", minorUnits: 2, factor: 100}
// HRK currency struct
HRK = Currency{code: "HRK", minorUnits: 2, factor: 100}
// HTG currency struct
HTG = Currency{code: "HTG", minorUnits: 2, factor: 100}
// HUF currency struct
HUF = Currency{code: "HUF", minorUnits: 2, factor: 100}
// IDR currency struct
IDR = Currency{code: "IDR", minorUnits: 2, factor: 100}
// ILS currency struct
ILS = Currency{code: "ILS", minorUnits: 2, factor: 100}
// INR currency struct
INR = Currency{code: "INR", minorUnits: 2, factor: 100}
// IQD currency struct
IQD = Currency{code: "IQD", minorUnits: 3, factor: 1000}
// IRR currency struct
IRR = Currency{code: "IRR", minorUnits: 2, factor: 100}
// ISK currency struct
ISK = Currency{code: "ISK", minorUnits: 0, factor: 1}
// JMD currency struct
JMD = Currency{code: "JMD", minorUnits: 2, factor: 100}
// JOD currency struct
JOD = Currency{code: "JOD", minorUnits: 3, factor: 1000}
// JPY currency struct
JPY = Currency{code: "JPY", minorUnits: 0, factor: 1}
// KES currency struct
KES = Currency{code: "KES", minorUnits: 2, factor: 100}
// KGS currency struct
KGS = Currency{code: "KGS", minorUnits: 2, factor: 100}
// KHR currency struct
KHR = Currency{code: "KHR", minorUnits: 2, factor: 100}
// KMF currency struct
KMF = Currency{code: "KMF", minorUnits: 0, factor: 1}
// KPW currency struct
KPW = Currency{code: "KPW", minorUnits: 2, factor: 100}
// KRW currency struct
KRW = Currency{code: "KRW", minorUnits: 0, factor: 1}
// KWD currency struct
KWD = Currency{code: "KWD", minorUnits: 3, factor: 1000}
// KYD currency struct
KYD = Currency{code: "KYD", minorUnits: 2, factor: 100}
// KZT currency struct
KZT = Currency{code: "KZT", minorUnits: 2, factor: 100}
// LAK currency struct
LAK = Currency{code: "LAK", minorUnits: 2, factor: 100}
// LBP currency struct
LBP = Currency{code: "LBP", minorUnits: 2, factor: 100}
// LKR currency struct
LKR = Currency{code: "LKR", minorUnits: 2, factor: 100}
// LRD currency struct
LRD = Currency{code: "LRD", minorUnits: 2, factor: 100}
// LSL currency struct
LSL = Currency{code: "LSL", minorUnits: 2, factor: 100}
// LYD currency struct
LYD = Currency{code: "LYD", minorUnits: 3, factor: 1000}
// MAD currency struct
MAD = Currency{code: "MAD", minorUnits: 2, factor: 100}
// MDL currency struct
MDL = Currency{code: "MDL", minorUnits: 2, factor: 100}
// MGA currency struct
MGA = Currency{code: "MGA", minorUnits: 2, factor: 100}
// MKD currency struct
MKD = Currency{code: "MKD", minorUnits: 2, factor: 100}
// MMK currency struct
MMK = Currency{code: "MMK", minorUnits: 2, factor: 100}
// MNT currency struct
MNT = Currency{code: "MNT", minorUnits: 2, factor: 100}
// MOP currency struct
MOP = Currency{code: "MOP", minorUnits: 2, factor: 100}
// MRU currency struct
MRU = Currency{code: "MRU", minorUnits: 2, factor: 100}
// MUR currency struct
MUR = Currency{code: "MUR", minorUnits: 2, factor: 100}
// MVR currency struct
MVR = Currency{code: "MVR", minorUnits: 2, factor: 100}
// MWK currency struct
MWK = Currency{code: "MWK", minorUnits: 2, factor: 100}
// MXN currency struct
MXN = Currency{code: "MXN", minorUnits: 2, factor: 100}
// MXV currency struct
MXV = Currency{code: "MXV", minorUnits: 2, factor: 100}
// MYR currency struct
MYR = Currency{code: "MYR", minorUnits: 2, factor: 100}
// MZN currency struct
MZN = Currency{code: "MZN", minorUnits: 2, factor: 100}
// NAD currency struct
NAD = Currency{code: "NAD", minorUnits: 2, factor: 100}
// NGN currency struct
NGN = Currency{code: "NGN", minorUnits: 2, factor: 100}
// NIO currency struct
NIO = Currency{code: "NIO", minorUnits: 2, factor: 100}
// NOK currency struct
NOK = Currency{code: "NOK", minorUnits: 2, factor: 100}
// NPR currency struct
NPR = Currency{code: "NPR", minorUnits: 2, factor: 100}
// NZD currency struct
NZD = Currency{code: "NZD", minorUnits: 2, factor: 100}
// OMR currency struct
OMR = Currency{code: "OMR", minorUnits: 3, factor: 1000}
// PAB currency struct
PAB = Currency{code: "PAB", minorUnits: 2, factor: 100}
// PEN currency struct
PEN = Currency{code: "PEN", minorUnits: 2, factor: 100}
// PGK currency struct
PGK = Currency{code: "PGK", minorUnits: 2, factor: 100}
// PHP currency struct
PHP = Currency{code: "PHP", minorUnits: 2, factor: 100}
// PKR currency struct
PKR = Currency{code: "PKR", minorUnits: 2, factor: 100}
// PLN currency struct
PLN = Currency{code: "PLN", minorUnits: 2, factor: 100}
// PYG currency struct
PYG = Currency{code: "PYG", minorUnits: 0, factor: 1}
// QAR currency struct
QAR = Currency{code: "QAR", minorUnits: 2, factor: 100}
// RON currency struct
RON = Currency{code: "RON", minorUnits: 2, factor: 100}
// RSD currency struct
RSD = Currency{code: "RSD", minorUnits: 2, factor: 100}
// RUB currency struct
RUB = Currency{code: "RUB", minorUnits: 2, factor: 100}
// RWF currency struct
RWF = Currency{code: "RWF", minorUnits: 0, factor: 1}
// SAR currency struct
SAR = Currency{code: "SAR", minorUnits: 2, factor: 100}
// SBD currency struct
SBD = Currency{code: "SBD", minorUnits: 2, factor: 100}
// SCR currency struct
SCR = Currency{code: "SCR", minorUnits: 2, factor: 100}
// SDG currency struct
SDG = Currency{code: "SDG", minorUnits: 2, factor: 100}
// SEK currency struct
SEK = Currency{code: "SEK", minorUnits: 2, factor: 100}
// SGD currency struct
SGD = Currency{code: "SGD", minorUnits: 2, factor: 100}
// SHP currency struct
SHP = Currency{code: "SHP", minorUnits: 2, factor: 100}
// SLL currency struct
SLL = Currency{code: "SLL", minorUnits: 2, factor: 100}
// SOS currency struct
SOS = Currency{code: "SOS", minorUnits: 2, factor: 100}
// SRD currency struct
SRD = Currency{code: "SRD", minorUnits: 2, factor: 100}
// SSP currency struct
SSP = Currency{code: "SSP", minorUnits: 2, factor: 100}
// STN currency struct
STN = Currency{code: "STN", minorUnits: 2, factor: 100}
// SVC currency struct
SVC = Currency{code: "SVC", minorUnits: 2, factor: 100}
// SYP currency struct
SYP = Currency{code: "SYP", minorUnits: 2, factor: 100}
// SZL currency struct
SZL = Currency{code: "SZL", minorUnits: 2, factor: 100}
// THB currency struct
THB = Currency{code: "THB", minorUnits: 2, factor: 100}
// TJS currency struct
TJS = Currency{code: "TJS", minorUnits: 2, factor: 100}
// TMT currency struct
TMT = Currency{code: "TMT", minorUnits: 2, factor: 100}
// TND currency struct
TND = Currency{code: "TND", minorUnits: 3, factor: 1000}
// TOP currency struct
TOP = Currency{code: "TOP", minorUnits: 2, factor: 100}
// TRY currency struct
TRY = Currency{code: "TRY", minorUnits: 2, factor: 100}
// TTD currency struct
TTD = Currency{code: "TTD", minorUnits: 2, factor: 100}
// TWD currency struct
TWD = Currency{code: "TWD", minorUnits: 2, factor: 100}
// TZS currency struct
TZS = Currency{code: "TZS", minorUnits: 2, factor: 100}
// UAH currency struct
UAH = Currency{code: "UAH", minorUnits: 2, factor: 100}
// UGX currency struct
UGX = Currency{code: "UGX", minorUnits: 0, factor: 1}
// USD currency struct
USD = Currency{code: "USD", minorUnits: 2, factor: 100}
// USN currency struct
USN = Currency{code: "USN", minorUnits: 2, factor: 100}
// UYI currency struct
UYI = Currency{code: "UYI", minorUnits: 0, factor: 1}
// UYU currency struct
UYU = Currency{code: "UYU", minorUnits: 2, factor: 100}
// UYW currency struct
UYW = Currency{code: "UYW", minorUnits: 4, factor: 10000}
// UZS currency struct
UZS = Currency{code: "UZS", minorUnits: 2, factor: 100}
// VES currency struct
VES = Currency{code: "VES", minorUnits: 2, factor: 100}
// VND currency struct
VND = Currency{code: "VND", minorUnits: 0, factor: 1}
// VUV currency struct
VUV = Currency{code: "VUV", minorUnits: 0, factor: 1}
// WST currency struct
WST = Currency{code: "WST", minorUnits: 2, factor: 100}
// XAF currency struct
XAF = Currency{code: "XAF", minorUnits: 0, factor: 1}
// XAG currency struct
XAG = Currency{code: "XAG", minorUnits: 0, factor: 1}
// XAU currency struct
XAU = Currency{code: "XAU", minorUnits: 0, factor: 1}
// XBA currency struct
XBA = Currency{code: "XBA", minorUnits: 0, factor: 1}
// XBB currency struct
XBB = Currency{code: "XBB", minorUnits: 0, factor: 1}
// XBC currency struct
XBC = Currency{code: "XBC", minorUnits: 0, factor: 1}
// XBD currency struct
XBD = Currency{code: "XBD", minorUnits: 0, factor: 1}
// XCD currency struct
XCD = Currency{code: "XCD", minorUnits: 2, factor: 100}
// XDR currency struct
XDR = Currency{code: "XDR", minorUnits: 0, factor: 1}
// XOF currency struct
XOF = Currency{code: "XOF", minorUnits: 0, factor: 1}
// XPD currency struct
XPD = Currency{code: "XPD", minorUnits: 0, factor: 1}
// XPF currency struct
XPF = Currency{code: "XPF", minorUnits: 0, factor: 1}
// XPT currency struct
XPT = Currency{code: "XPT", minorUnits: 0, factor: 1}
// XSU currency struct
XSU = Currency{code: "XSU", minorUnits: 0, factor: 1}
// XTS currency struct
XTS = Currency{code: "XTS", minorUnits: 0, factor: 1}
// XUA currency struct
XUA = Currency{code: "XUA", minorUnits: 0, factor: 1}
// XXX currency struct
XXX = Currency{code: "XXX", minorUnits: 0, factor: 1}
// YER currency struct
YER = Currency{code: "YER", minorUnits: 2, factor: 100}
// ZAR currency struct
ZAR = Currency{code: "ZAR", minorUnits: 2, factor: 100}
// ZMW currency struct
ZMW = Currency{code: "ZMW", minorUnits: 2, factor: 100}
// ZWL currency struct
ZWL = Currency{code: "ZWL", minorUnits: 2, factor: 100}
)
var currencies = map[string]Currency{
"AED": AED,
"AFN": AFN,
"ALL": ALL,
"AMD": AMD,
"ANG": ANG,
"AOA": AOA,
"ARS": ARS,
"AUD": AUD,
"AWG": AWG,
"AZN": AZN,
"BAM": BAM,
"BBD": BBD,
"BDT": BDT,
"BGN": BGN,
"BHD": BHD,
"BIF": BIF,
"BMD": BMD,
"BND": BND,
"BOB": BOB,
"BOV": BOV,
"BRL": BRL,
"BSD": BSD,
"BTN": BTN,
"BWP": BWP,
"BYN": BYN,
"BZD": BZD,
"CAD": CAD,
"CDF": CDF,
"CHE": CHE,
"CHF": CHF,
"CHW": CHW,
"CLF": CLF,
"CLP": CLP,
"CNY": CNY,
"COP": COP,
"COU": COU,
"CRC": CRC,
"CUC": CUC,
"CUP": CUP,
"CVE": CVE,
"CZK": CZK,
"DJF": DJF,
"DKK": DKK,
"DOP": DOP,
"DZD": DZD,
"EGP": EGP,
"ERN": ERN,
"ETB": ETB,
"EUR": EUR,
"FJD": FJD,
"FKP": FKP,
"GBP": GBP,
"GEL": GEL,
"GHS": GHS,
"GIP": GIP,
"GMD": GMD,
"GNF": GNF,
"GTQ": GTQ,
"GYD": GYD,
"HKD": HKD,
"HNL": HNL,
"HRK": HRK,
"HTG": HTG,
"HUF": HUF,
"IDR": IDR,
"ILS": ILS,
"INR": INR,
"IQD": IQD,
"IRR": IRR,
"ISK": ISK,
"JMD": JMD,
"JOD": JOD,
"JPY": JPY,
"KES": KES,
"KGS": KGS,
"KHR": KHR,
"KMF": KMF,
"KPW": KPW,
"KRW": KRW,
"KWD": KWD,
"KYD": KYD,
"KZT": KZT,
"LAK": LAK,
"LBP": LBP,
"LKR": LKR,
"LRD": LRD,
"LSL": LSL,
"LYD": LYD,
"MAD": MAD,
"MDL": MDL,
"MGA": MGA,
"MKD": MKD,
"MMK": MMK,
"MNT": MNT,
"MOP": MOP,
"MRU": MRU,
"MUR": MUR,
"MVR": MVR,
"MWK": MWK,
"MXN": MXN,
"MXV": MXV,
"MYR": MYR,
"MZN": MZN,
"NAD": NAD,
"NGN": NGN,
"NIO": NIO,
"NOK": NOK,
"NPR": NPR,
"NZD": NZD,
"OMR": OMR,
"PAB": PAB,
"PEN": PEN,
"PGK": PGK,
"PHP": PHP,
"PKR": PKR,
"PLN": PLN,
"PYG": PYG,
"QAR": QAR,
"RON": RON,
"RSD": RSD,
"RUB": RUB,
"RWF": RWF,
"SAR": SAR,
"SBD": SBD,
"SCR": SCR,
"SDG": SDG,
"SEK": SEK,
"SGD": SGD,
"SHP": SHP,
"SLL": SLL,
"SOS": SOS,
"SRD": SRD,
"SSP": SSP,
"STN": STN,
"SVC": SVC,
"SYP": SYP,
"SZL": SZL,
"THB": THB,
"TJS": TJS,
"TMT": TMT,
"TND": TND,
"TOP": TOP,
"TRY": TRY,
"TTD": TTD,
"TWD": TWD,
"TZS": TZS,
"UAH": UAH,
"UGX": UGX,
"USD": USD,
"USN": USN,
"UYI": UYI,
"UYU": UYU,
"UYW": UYW,
"UZS": UZS,
"VES": VES,
"VND": VND,
"VUV": VUV,
"WST": WST,
"XAF": XAF,
"XAG": XAG,
"XAU": XAU,
"XBA": XBA,
"XBB": XBB,
"XBC": XBC,
"XBD": XBD,
"XCD": XCD,
"XDR": XDR,
"XOF": XOF,
"XPD": XPD,
"XPF": XPF,
"XPT": XPT,
"XSU": XSU,
"XTS": XTS,
"XUA": XUA,
"XXX": XXX,
"YER": YER,
"ZAR": ZAR,
"ZMW": ZMW,
"ZWL": ZWL,
}
// ValidCodes is provided so that you may build your own validation against it
var ValidCodes = []string{
"AED",
"AFN",
"ALL",
"AMD",
"ANG",
"AOA",
"ARS",
"AUD",
"AWG",
"AZN",
"BAM",
"BBD",
"BDT",
"BGN",
"BHD",
"BIF",
"BMD",
"BND",
"BOB",
"BOV",
"BRL",
"BSD",
"BTN",
"BWP",
"BYN",
"BZD",
"CAD",
"CDF",
"CHE",
"CHF",
"CHW",
"CLF",
"CLP",
"CNY",
"COP",
"COU",
"CRC",
"CUC",
"CUP",
"CVE",
"CZK",
"DJF",
"DKK",
"DOP",
"DZD",
"EGP",
"ERN",
"ETB",
"EUR",
"FJD",
"FKP",
"GBP",
"GEL",
"GHS",
"GIP",
"GMD",
"GNF",
"GTQ",
"GYD",
"HKD",
"HNL",
"HRK",
"HTG",
"HUF",
"IDR",
"ILS",
"INR",
"IQD",
"IRR",
"ISK",
"JMD",
"JOD",
"JPY",
"KES",
"KGS",
"KHR",
"KMF",
"KPW",
"KRW",
"KWD",
"KYD",
"KZT",
"LAK",
"LBP",
"LKR",
"LRD",
"LSL",
"LYD",
"MAD",
"MDL",
"MGA",
"MKD",
"MMK",
"MNT",
"MOP",
"MRU",
"MUR",
"MVR",
"MWK",
"MXN",
"MXV",
"MYR",
"MZN",
"NAD",
"NGN",
"NIO",
"NOK",
"NPR",
"NZD",
"OMR",
"PAB",
"PEN",
"PGK",
"PHP",
"PKR",
"PLN",
"PYG",
"QAR",
"RON",
"RSD",
"RUB",
"RWF",
"SAR",
"SBD",
"SCR",
"SDG",
"SEK",
"SGD",
"SHP",
"SLL",
"SOS",
"SRD",
"SSP",
"STN",
"SVC",
"SYP",
"SZL",
"THB",
"TJS",
"TMT",
"TND",
"TOP",
"TRY",
"TTD",
"TWD",
"TZS",
"UAH",
"UGX",
"USD",
"USN",
"UYI",
"UYU",
"UYW",
"UZS",
"VES",
"VND",
"VUV",
"WST",
"XAF",
"XAG",
"XAU",
"XBA",
"XBB",
"XBC",
"XBD",
"XCD",
"XDR",
"XOF",
"XPD",
"XPF",
"XPT",
"XSU",
"XTS",
"XUA",
"XXX",
"YER",
"ZAR",
"ZMW",
"ZWL",
}