Rename fetch_sets to comply to Golang standards
This commit is contained in:
parent
339cb56eb2
commit
27be6bf772
@ -211,7 +211,7 @@ func fetchCard(path string) (*Card, error) {
|
|||||||
return val, nil
|
return val, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func fetch_sets() (*SetList, error) {
|
func fetchSets() (*SetList, error) {
|
||||||
// TODO better URL Building...
|
// TODO better URL Building...
|
||||||
resp, err := http.Get("https://api.scryfall.com/sets")
|
resp, err := http.Get("https://api.scryfall.com/sets")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@ -49,7 +49,7 @@ var updateCmd = &cobra.Command{
|
|||||||
{"usdfoil", bson.D{{"$sum", bson.D{{"$multiply", bson.A{"$last_price.usd_foil", "$serra_count_foil"}}}}}},
|
{"usdfoil", bson.D{{"$sum", bson.D{{"$multiply", bson.A{"$last_price.usd_foil", "$serra_count_foil"}}}}}},
|
||||||
}}}
|
}}}
|
||||||
|
|
||||||
sets, _ := fetch_sets()
|
sets, _ := fetchSets()
|
||||||
for _, set := range sets.Data {
|
for _, set := range sets.Data {
|
||||||
|
|
||||||
// When downloading new sets, PriceList needs to be initialized
|
// When downloading new sets, PriceList needs to be initialized
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user