Fix currency symbol being hardcoded to $

This commit is contained in:
Svilen Markov
2024-04-29 22:32:46 +01:00
parent 189b8895b0
commit d5d6103327
3 changed files with 38 additions and 4 deletions

View File

@@ -59,9 +59,35 @@ type Video struct {
type Videos []Video
var currencyToSymbol = map[string]string{
"USD": "$",
"EUR": "€",
"JPY": "¥",
"CAD": "C$",
"AUD": "A$",
"GBP": "£",
"CHF": "Fr",
"NZD": "N$",
"INR": "₹",
"BRL": "R$",
"RUB": "₽",
"TRY": "₺",
"ZAR": "R",
"CNY": "¥",
"KRW": "₩",
"HKD": "HK$",
"SGD": "S$",
"SEK": "kr",
"NOK": "kr",
"DKK": "kr",
"PLN": "zł",
"PHP": "₱",
}
type Stock struct {
Name string
Symbol string
Currency string
Price float64
PercentChange float64
SvgChartPoints string