Returned StarCityGames support

This commit is contained in:
Aryom Belousov 2020-11-09 15:24:32 +03:00
parent de1187b96c
commit 7c6a6176dc
12 changed files with 133 additions and 72 deletions

View file

@ -8,15 +8,7 @@ func FormatCardPrices(name string, prices []CardPrice) string {
message := fmt.Sprintf("Оригинальное название: %v\n", name)
message += fmt.Sprintf("Результатов: %v\n", len(prices))
for i, v := range prices {
message += fmt.Sprintf("%v. %v\nRegular: %v\nFoil: %v\n", i+1, v.Edition, formatPrice(v.Price), formatPrice(v.PriceFoil))
message += fmt.Sprintf("%v\n", v.Link)
message += fmt.Sprintf("%v. %v", i + 1, v.Format())
}
return message
}
func formatPrice(price string) string {
if price == "" {
return "-"
}
return fmt.Sprintf("$%v", price)
}