Fixed bug with amount of results

This commit is contained in:
Artyom Belousov 2020-09-22 11:23:32 +03:00
parent dbce21cfa6
commit 06d43a67d5

View file

@ -33,5 +33,8 @@ func GetPrices(name string) ([]CardPrice, error) {
}
prices = append(prices, cardPrice)
}
if len(prices) > 5 {
return prices[:5], nil
}
return prices, nil
}