Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AFN = CurrencyCode{Code: "AFN", NumericCode: "971", Name: "Afghani", DecimalPlaces: 2} EUR = CurrencyCode{Code: "EUR", NumericCode: "978", Name: "Euro", DecimalPlaces: 2} ALL = CurrencyCode{Code: "ALL", NumericCode: "008", Name: "Lek", DecimalPlaces: 2} DZD = CurrencyCode{Code: "DZD", NumericCode: "012", Name: "Algerian Dinar", DecimalPlaces: 2} USD = CurrencyCode{Code: "USD", NumericCode: "840", Name: "US Dollar", DecimalPlaces: 2} AOA = CurrencyCode{Code: "AOA", NumericCode: "973", Name: "Kwanza", DecimalPlaces: 2} XCD = CurrencyCode{Code: "XCD", NumericCode: "951", Name: "East Caribbean Dollar", DecimalPlaces: 2} ARS = CurrencyCode{Code: "ARS", NumericCode: "032", Name: "Argentine Peso", DecimalPlaces: 2} AMD = CurrencyCode{Code: "AMD", NumericCode: "051", Name: "Armenian Dram", DecimalPlaces: 2} AWG = CurrencyCode{Code: "AWG", NumericCode: "533", Name: "Aruban Florin", DecimalPlaces: 2} AUD = CurrencyCode{Code: "AUD", NumericCode: "036", Name: "Australian Dollar", DecimalPlaces: 2} AZN = CurrencyCode{Code: "AZN", NumericCode: "944", Name: "Azerbaijan Manat", DecimalPlaces: 2} BSD = CurrencyCode{Code: "BSD", NumericCode: "044", Name: "Bahamian Dollar", DecimalPlaces: 2} BHD = CurrencyCode{Code: "BHD", NumericCode: "048", Name: "Bahraini Dinar", DecimalPlaces: 3} BDT = CurrencyCode{Code: "BDT", NumericCode: "050", Name: "Taka", DecimalPlaces: 2} BBD = CurrencyCode{Code: "BBD", NumericCode: "052", Name: "Barbados Dollar", DecimalPlaces: 2} BYN = CurrencyCode{Code: "BYN", NumericCode: "933", Name: "Belarusian Ruble", DecimalPlaces: 2} BZD = CurrencyCode{Code: "BZD", NumericCode: "084", Name: "Belize Dollar", DecimalPlaces: 2} XOF = CurrencyCode{Code: "XOF", NumericCode: "952", Name: "CFA Franc BCEAO", DecimalPlaces: 0} BMD = CurrencyCode{Code: "BMD", NumericCode: "060", Name: "Bermudian Dollar", DecimalPlaces: 2} INR = CurrencyCode{Code: "INR", NumericCode: "356", Name: "Indian Rupee", DecimalPlaces: 2} BTN = CurrencyCode{Code: "BTN", NumericCode: "064", Name: "Ngultrum", DecimalPlaces: 2} BOB = CurrencyCode{Code: "BOB", NumericCode: "068", Name: "Boliviano", DecimalPlaces: 2} BOV = CurrencyCode{Code: "BOV", NumericCode: "984", Name: "Mvdol", DecimalPlaces: 2} BAM = CurrencyCode{Code: "BAM", NumericCode: "977", Name: "Convertible Mark", DecimalPlaces: 2} BWP = CurrencyCode{Code: "BWP", NumericCode: "072", Name: "Pula", DecimalPlaces: 2} NOK = CurrencyCode{Code: "NOK", NumericCode: "578", Name: "Norwegian Krone", DecimalPlaces: 2} BRL = CurrencyCode{Code: "BRL", NumericCode: "986", Name: "Brazilian Real", DecimalPlaces: 2} BND = CurrencyCode{Code: "BND", NumericCode: "096", Name: "Brunei Dollar", DecimalPlaces: 2} BGN = CurrencyCode{Code: "BGN", NumericCode: "975", Name: "Bulgarian Lev", DecimalPlaces: 2} BIF = CurrencyCode{Code: "BIF", NumericCode: "108", Name: "Burundi Franc", DecimalPlaces: 0} CVE = CurrencyCode{Code: "CVE", NumericCode: "132", Name: "Cabo Verde Escudo", DecimalPlaces: 2} KHR = CurrencyCode{Code: "KHR", NumericCode: "116", Name: "Riel", DecimalPlaces: 2} XAF = CurrencyCode{Code: "XAF", NumericCode: "950", Name: "CFA Franc BEAC", DecimalPlaces: 0} CAD = CurrencyCode{Code: "CAD", NumericCode: "124", Name: "Canadian Dollar", DecimalPlaces: 2} KYD = CurrencyCode{Code: "KYD", NumericCode: "136", Name: "Cayman Islands Dollar", DecimalPlaces: 2} CLP = CurrencyCode{Code: "CLP", NumericCode: "152", Name: "Chilean Peso", DecimalPlaces: 0} CLF = CurrencyCode{Code: "CLF", NumericCode: "990", Name: "Unidad de Fomento", DecimalPlaces: 4} CNY = CurrencyCode{Code: "CNY", NumericCode: "156", Name: "Yuan Renminbi", DecimalPlaces: 2} CNH = CurrencyCode{Code: "CNH", NumericCode: "157", Name: "Yuan Fen", DecimalPlaces: 2} COP = CurrencyCode{Code: "COP", NumericCode: "170", Name: "Colombian Peso", DecimalPlaces: 2} COU = CurrencyCode{Code: "COU", NumericCode: "970", Name: "Unidad de Valor Real", DecimalPlaces: 2} KMF = CurrencyCode{Code: "KMF", NumericCode: "174", Name: "Comorian Franc", DecimalPlaces: 0} CDF = CurrencyCode{Code: "CDF", NumericCode: "976", Name: "Congolese Franc", DecimalPlaces: 2} NZD = CurrencyCode{Code: "NZD", NumericCode: "554", Name: "New Zealand Dollar", DecimalPlaces: 2} CRC = CurrencyCode{Code: "CRC", NumericCode: "188", Name: "Costa Rican Colon", DecimalPlaces: 2} HRK = CurrencyCode{Code: "HRK", NumericCode: "191", Name: "Kuna", DecimalPlaces: 2} CUP = CurrencyCode{Code: "CUP", NumericCode: "192", Name: "Cuban Peso", DecimalPlaces: 2} CUC = CurrencyCode{Code: "CUC", NumericCode: "931", Name: "Peso Convertible", DecimalPlaces: 2} ANG = CurrencyCode{Code: "ANG", NumericCode: "532", Name: "Netherlands Antillean Guilder", DecimalPlaces: 2} CZK = CurrencyCode{Code: "CZK", NumericCode: "203", Name: "Czech Koruna", DecimalPlaces: 2} DKK = CurrencyCode{Code: "DKK", NumericCode: "208", Name: "Danish Krone", DecimalPlaces: 2} DJF = CurrencyCode{Code: "DJF", NumericCode: "262", Name: "Djibouti Franc", DecimalPlaces: 0} DOP = CurrencyCode{Code: "DOP", NumericCode: "214", Name: "Dominican Peso", DecimalPlaces: 2} EGP = CurrencyCode{Code: "EGP", NumericCode: "818", Name: "Egyptian Pound", DecimalPlaces: 2} SVC = CurrencyCode{Code: "SVC", NumericCode: "222", Name: "El Salvador Colon", DecimalPlaces: 2} ERN = CurrencyCode{Code: "ERN", NumericCode: "232", Name: "Nakfa", DecimalPlaces: 2} SZL = CurrencyCode{Code: "SZL", NumericCode: "748", Name: "Lilangeni", DecimalPlaces: 2} ETB = CurrencyCode{Code: "ETB", NumericCode: "230", Name: "Ethiopian Birr", DecimalPlaces: 2} FKP = CurrencyCode{Code: "FKP", NumericCode: "238", Name: "Falkland Islands Pound", DecimalPlaces: 2} FJD = CurrencyCode{Code: "FJD", NumericCode: "242", Name: "Fiji Dollar", DecimalPlaces: 2} XPF = CurrencyCode{Code: "XPF", NumericCode: "953", Name: "CFP Franc", DecimalPlaces: 0} GMD = CurrencyCode{Code: "GMD", NumericCode: "270", Name: "Dalasi", DecimalPlaces: 2} GEL = CurrencyCode{Code: "GEL", NumericCode: "981", Name: "Lari", DecimalPlaces: 2} GHS = CurrencyCode{Code: "GHS", NumericCode: "936", Name: "Ghana Cedi", DecimalPlaces: 2} GIP = CurrencyCode{Code: "GIP", NumericCode: "292", Name: "Gibraltar Pound", DecimalPlaces: 2} GTQ = CurrencyCode{Code: "GTQ", NumericCode: "320", Name: "Quetzal", DecimalPlaces: 2} GBP = CurrencyCode{Code: "GBP", NumericCode: "826", Name: "Pound Sterling", DecimalPlaces: 2} GNF = CurrencyCode{Code: "GNF", NumericCode: "324", Name: "Guinean Franc", DecimalPlaces: 0} GYD = CurrencyCode{Code: "GYD", NumericCode: "328", Name: "Guyana Dollar", DecimalPlaces: 2} HTG = CurrencyCode{Code: "HTG", NumericCode: "332", Name: "Gourde", DecimalPlaces: 2} HNL = CurrencyCode{Code: "HNL", NumericCode: "340", Name: "Lempira", DecimalPlaces: 2} HKD = CurrencyCode{Code: "HKD", NumericCode: "344", Name: "Hong Kong Dollar", DecimalPlaces: 2} HUF = CurrencyCode{Code: "HUF", NumericCode: "348", Name: "Forint", DecimalPlaces: 2} ISK = CurrencyCode{Code: "ISK", NumericCode: "352", Name: "Iceland Krona", DecimalPlaces: 0} IDR = CurrencyCode{Code: "IDR", NumericCode: "360", Name: "Rupiah", DecimalPlaces: 2} XDR = CurrencyCode{Code: "XDR", NumericCode: "960", Name: "SDR (Special Drawing Right)", DecimalPlaces: 0} IRR = CurrencyCode{Code: "IRR", NumericCode: "364", Name: "Iranian Rial", DecimalPlaces: 2} IQD = CurrencyCode{Code: "IQD", NumericCode: "368", Name: "Iraqi Dinar", DecimalPlaces: 3} ILS = CurrencyCode{Code: "ILS", NumericCode: "376", Name: "New Israeli Sheqel", DecimalPlaces: 2} JMD = CurrencyCode{Code: "JMD", NumericCode: "388", Name: "Jamaican Dollar", DecimalPlaces: 2} JPY = CurrencyCode{Code: "JPY", NumericCode: "392", Name: "Yen", DecimalPlaces: 0} JOD = CurrencyCode{Code: "JOD", NumericCode: "400", Name: "Jordanian Dinar", DecimalPlaces: 3} KZT = CurrencyCode{Code: "KZT", NumericCode: "398", Name: "Tenge", DecimalPlaces: 2} KES = CurrencyCode{Code: "KES", NumericCode: "404", Name: "Kenyan Shilling", DecimalPlaces: 2} KPW = CurrencyCode{Code: "KPW", NumericCode: "408", Name: "North Korean Won", DecimalPlaces: 2} KRW = CurrencyCode{Code: "KRW", NumericCode: "410", Name: "Won", DecimalPlaces: 0} KWD = CurrencyCode{Code: "KWD", NumericCode: "414", Name: "Kuwaiti Dinar", DecimalPlaces: 3} KGS = CurrencyCode{Code: "KGS", NumericCode: "417", Name: "Som", DecimalPlaces: 2} LAK = CurrencyCode{Code: "LAK", NumericCode: "418", Name: "Lao Kip", DecimalPlaces: 2} LBP = CurrencyCode{Code: "LBP", NumericCode: "422", Name: "Lebanese Pound", DecimalPlaces: 2} LSL = CurrencyCode{Code: "LSL", NumericCode: "426", Name: "Loti", DecimalPlaces: 2} ZAR = CurrencyCode{Code: "ZAR", NumericCode: "710", Name: "Rand", DecimalPlaces: 2} LRD = CurrencyCode{Code: "LRD", NumericCode: "430", Name: "Liberian Dollar", DecimalPlaces: 2} LYD = CurrencyCode{Code: "LYD", NumericCode: "434", Name: "Libyan Dinar", DecimalPlaces: 3} CHF = CurrencyCode{Code: "CHF", NumericCode: "756", Name: "Swiss Franc", DecimalPlaces: 2} MOP = CurrencyCode{Code: "MOP", NumericCode: "446", Name: "Pataca", DecimalPlaces: 2} MKD = CurrencyCode{Code: "MKD", NumericCode: "807", Name: "Denar", DecimalPlaces: 2} MGA = CurrencyCode{Code: "MGA", NumericCode: "969", Name: "Malagasy Ariary", DecimalPlaces: 2} MWK = CurrencyCode{Code: "MWK", NumericCode: "454", Name: "Malawi Kwacha", DecimalPlaces: 2} MYR = CurrencyCode{Code: "MYR", NumericCode: "458", Name: "Malaysian Ringgit", DecimalPlaces: 2} MVR = CurrencyCode{Code: "MVR", NumericCode: "462", Name: "Rufiyaa", DecimalPlaces: 2} MRU = CurrencyCode{Code: "MRU", NumericCode: "929", Name: "Ouguiya", DecimalPlaces: 2} MUR = CurrencyCode{Code: "MUR", NumericCode: "480", Name: "Mauritius Rupee", DecimalPlaces: 2} XUA = CurrencyCode{Code: "XUA", NumericCode: "965", Name: "ADB Unit of Account", DecimalPlaces: 0} MXN = CurrencyCode{Code: "MXN", NumericCode: "484", Name: "Mexican Peso", DecimalPlaces: 2} MXV = CurrencyCode{Code: "MXV", NumericCode: "979", Name: "Mexican Unidad de Inversion (UDI)", DecimalPlaces: 2} MDL = CurrencyCode{Code: "MDL", NumericCode: "498", Name: "Moldovan Leu", DecimalPlaces: 2} MNT = CurrencyCode{Code: "MNT", NumericCode: "496", Name: "Tugrik", DecimalPlaces: 2} MAD = CurrencyCode{Code: "MAD", NumericCode: "504", Name: "Moroccan Dirham", DecimalPlaces: 2} MZN = CurrencyCode{Code: "MZN", NumericCode: "943", Name: "Mozambique Metical", DecimalPlaces: 2} MMK = CurrencyCode{Code: "MMK", NumericCode: "104", Name: "Kyat", DecimalPlaces: 2} NAD = CurrencyCode{Code: "NAD", NumericCode: "516", Name: "Namibia Dollar", DecimalPlaces: 2} NPR = CurrencyCode{Code: "NPR", NumericCode: "524", Name: "Nepalese Rupee", DecimalPlaces: 2} NIO = CurrencyCode{Code: "NIO", NumericCode: "558", Name: "Cordoba Oro", DecimalPlaces: 2} NGN = CurrencyCode{Code: "NGN", NumericCode: "566", Name: "Naira", DecimalPlaces: 2} OMR = CurrencyCode{Code: "OMR", NumericCode: "512", Name: "Rial Omani", DecimalPlaces: 3} PKR = CurrencyCode{Code: "PKR", NumericCode: "586", Name: "Pakistan Rupee", DecimalPlaces: 2} PAB = CurrencyCode{Code: "PAB", NumericCode: "590", Name: "Balboa", DecimalPlaces: 2} PGK = CurrencyCode{Code: "PGK", NumericCode: "598", Name: "Kina", DecimalPlaces: 2} PYG = CurrencyCode{Code: "PYG", NumericCode: "600", Name: "Guarani", DecimalPlaces: 0} PEN = CurrencyCode{Code: "PEN", NumericCode: "604", Name: "Sol", DecimalPlaces: 2} PHP = CurrencyCode{Code: "PHP", NumericCode: "608", Name: "Philippine Peso", DecimalPlaces: 2} PLN = CurrencyCode{Code: "PLN", NumericCode: "985", Name: "Zloty", DecimalPlaces: 2} QAR = CurrencyCode{Code: "QAR", NumericCode: "634", Name: "Qatari Rial", DecimalPlaces: 2} RON = CurrencyCode{Code: "RON", NumericCode: "946", Name: "Romanian Leu", DecimalPlaces: 2} RUB = CurrencyCode{Code: "RUB", NumericCode: "643", Name: "Russian Ruble", DecimalPlaces: 2} RWF = CurrencyCode{Code: "RWF", NumericCode: "646", Name: "Rwanda Franc", DecimalPlaces: 0} SHP = CurrencyCode{Code: "SHP", NumericCode: "654", Name: "Saint Helena Pound", DecimalPlaces: 2} WST = CurrencyCode{Code: "WST", NumericCode: "882", Name: "Tala", DecimalPlaces: 2} STN = CurrencyCode{Code: "STN", NumericCode: "930", Name: "Dobra", DecimalPlaces: 2} SAR = CurrencyCode{Code: "SAR", NumericCode: "682", Name: "Saudi Riyal", DecimalPlaces: 2} RSD = CurrencyCode{Code: "RSD", NumericCode: "941", Name: "Serbian Dinar", DecimalPlaces: 2} SCR = CurrencyCode{Code: "SCR", NumericCode: "690", Name: "Seychelles Rupee", DecimalPlaces: 2} SLL = CurrencyCode{Code: "SLL", NumericCode: "694", Name: "Leone", DecimalPlaces: 2} SGD = CurrencyCode{Code: "SGD", NumericCode: "702", Name: "Singapore Dollar", DecimalPlaces: 2} XSU = CurrencyCode{Code: "XSU", NumericCode: "994", Name: "Sucre", DecimalPlaces: 0} SBD = CurrencyCode{Code: "SBD", NumericCode: "090", Name: "Solomon Islands Dollar", DecimalPlaces: 2} SOS = CurrencyCode{Code: "SOS", NumericCode: "706", Name: "Somali Shilling", DecimalPlaces: 2} SSP = CurrencyCode{Code: "SSP", NumericCode: "728", Name: "South Sudanese Pound", DecimalPlaces: 2} LKR = CurrencyCode{Code: "LKR", NumericCode: "144", Name: "Sri Lanka Rupee", DecimalPlaces: 2} SDG = CurrencyCode{Code: "SDG", NumericCode: "938", Name: "Sudanese Pound", DecimalPlaces: 2} SRD = CurrencyCode{Code: "SRD", NumericCode: "968", Name: "Surinam Dollar", DecimalPlaces: 2} SEK = CurrencyCode{Code: "SEK", NumericCode: "752", Name: "Swedish Krona", DecimalPlaces: 2} CHE = CurrencyCode{Code: "CHE", NumericCode: "947", Name: "WIR Euro", DecimalPlaces: 2} CHW = CurrencyCode{Code: "CHW", NumericCode: "948", Name: "WIR Franc", DecimalPlaces: 2} SYP = CurrencyCode{Code: "SYP", NumericCode: "760", Name: "Syrian Pound", DecimalPlaces: 2} TWD = CurrencyCode{Code: "TWD", NumericCode: "901", Name: "New Taiwan Dollar", DecimalPlaces: 2} TJS = CurrencyCode{Code: "TJS", NumericCode: "972", Name: "Somoni", DecimalPlaces: 2} TZS = CurrencyCode{Code: "TZS", NumericCode: "834", Name: "Tanzanian Shilling", DecimalPlaces: 2} THB = CurrencyCode{Code: "THB", NumericCode: "764", Name: "Baht", DecimalPlaces: 2} TOP = CurrencyCode{Code: "TOP", NumericCode: "776", Name: "Pa'anga", DecimalPlaces: 2} TTD = CurrencyCode{Code: "TTD", NumericCode: "780", Name: "Trinidad and Tobago Dollar", DecimalPlaces: 2} TND = CurrencyCode{Code: "TND", NumericCode: "788", Name: "Tunisian Dinar", DecimalPlaces: 3} TRY = CurrencyCode{Code: "TRY", NumericCode: "949", Name: "Turkish Lira", DecimalPlaces: 2} TMT = CurrencyCode{Code: "TMT", NumericCode: "934", Name: "Turkmenistan New Manat", DecimalPlaces: 2} UGX = CurrencyCode{Code: "UGX", NumericCode: "800", Name: "Uganda Shilling", DecimalPlaces: 0} UAH = CurrencyCode{Code: "UAH", NumericCode: "980", Name: "Hryvnia", DecimalPlaces: 2} AED = CurrencyCode{Code: "AED", NumericCode: "784", Name: "UAE Dirham", DecimalPlaces: 2} USN = CurrencyCode{Code: "USN", NumericCode: "997", Name: "US Dollar (Next day)", DecimalPlaces: 2} UYU = CurrencyCode{Code: "UYU", NumericCode: "858", Name: "Peso Uruguayo", DecimalPlaces: 2} UYI = CurrencyCode{Code: "UYI", NumericCode: "940", Name: "Uruguay Peso en Unidades Indexadas (UI)", DecimalPlaces: 0} UYW = CurrencyCode{Code: "UYW", NumericCode: "927", Name: "Unidad Previsional", DecimalPlaces: 4} UZS = CurrencyCode{Code: "UZS", NumericCode: "860", Name: "Uzbekistan Sum", DecimalPlaces: 2} VUV = CurrencyCode{Code: "VUV", NumericCode: "548", Name: "Vatu", DecimalPlaces: 0} VES = CurrencyCode{Code: "VES", NumericCode: "928", Name: "Bolívar Soberano", DecimalPlaces: 2} VND = CurrencyCode{Code: "VND", NumericCode: "704", Name: "Dong", DecimalPlaces: 0} YER = CurrencyCode{Code: "YER", NumericCode: "886", Name: "Yemeni Rial", DecimalPlaces: 2} ZMW = CurrencyCode{Code: "ZMW", NumericCode: "967", Name: "Zambian Kwacha", DecimalPlaces: 2} ZWL = CurrencyCode{Code: "ZWL", NumericCode: "932", Name: "Zimbabwe Dollar", DecimalPlaces: 2} ZWG = CurrencyCode{Code: "ZWG", NumericCode: "924", Name: "Zimbabwe Gold", DecimalPlaces: 2} XBA = CurrencyCode{Code: "XBA", NumericCode: "955", Name: "Bond Markets Unit European Composite Unit (EURCO)", DecimalPlaces: 0} XBB = CurrencyCode{Code: "XBB", NumericCode: "956", Name: "Bond Markets Unit European Monetary Unit (E.M.U.-6)", DecimalPlaces: 0} XBC = CurrencyCode{Code: "XBC", NumericCode: "957", Name: "Bond Markets Unit European Unit of Account 9 (E.U.A.-9)", DecimalPlaces: 0} XBD = CurrencyCode{Code: "XBD", NumericCode: "958", Name: "Bond Markets Unit European Unit of Account 17 (E.U.A.-17)", DecimalPlaces: 0} XTS = CurrencyCode{Code: "XTS", NumericCode: "963", Name: "Codes specifically reserved for testing purposes", DecimalPlaces: 0} XXX = CurrencyCode{Code: "XXX", NumericCode: "999", Name: "The codes assigned for transactions where no currency is involved", DecimalPlaces: 0} XAU = CurrencyCode{Code: "XAU", NumericCode: "959", Name: "Gold", DecimalPlaces: 0} XPD = CurrencyCode{Code: "XPD", NumericCode: "964", Name: "Palladium", DecimalPlaces: 0} XPT = CurrencyCode{Code: "XPT", NumericCode: "962", Name: "Platinum", DecimalPlaces: 0} XAG = CurrencyCode{Code: "XAG", NumericCode: "961", Name: "Silver", DecimalPlaces: 0} )
Functions ¶
This section is empty.
Types ¶
type CurrencyCode ¶
type CurrencyCode struct {
Code, NumericCode, Name string
// DecimalPlaces represents the unsigned integer value of a currency's minor unit.
// DecimalPlaces is 0 if the currency doesn't have a minor unit.
DecimalPlaces uint8
}
func Lookup ¶
func Lookup(code string) (CurrencyCode, bool)
Lookup returns the corresponding ISO 4217 CurrencyCode for a numeric or alphanumeric code, and a boolean indicating whether a match was found.
Example: "USD"
func (CurrencyCode) String ¶
func (cc CurrencyCode) String() string
func (CurrencyCode) Valid ¶
func (cc CurrencyCode) Valid() bool
Click to show internal directories.
Click to hide internal directories.