Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UniqueSymbolList ¶ added in v1.0.4
UniqueSymbolList return list of unique currencies symbols
Types ¶
type Currency ¶
type Currency struct {
Code string `json:"code"`
Name string `json:"name"`
Symbol string `json:"symbol"`
MinorUnits int `json:"minor_units"`
}
func FindCurrenciesBySymbol ¶ added in v1.0.4
FindCurrenciesBySymbol return list of Currency by symbol
currencies := FindCurrenciesBySymbol("€")
func FindCurrency ¶
FindCurrency search of all currency codes and returns Currency struct
curr := FindCurrency("USD")
func FindUniqueSymbolCurrency ¶ added in v1.0.3
FindUniqueSymbolCurrency returns the Currency struct for the provided currency symbol, if it is unique for that currency
curr := FindUniqueSymbolCurrency("€")
func (*Currency) HasUniqueSymbol ¶ added in v1.0.4
HasUniqueSymbol check if Currency has unique symbol
isUnique := currency.HasUniqueSymbol()