diff --git a/sevenkeys/cmd/importcards/main.go b/sevenkeys/cmd/importcards/main.go deleted file mode 100644 index 095d44b..0000000 --- a/sevenkeys/cmd/importcards/main.go +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "encoding/json" - "io/ioutil" - "log" - "sevenkeys/database/operations" - "sevenkeys/scryfall/types" -) - -func check(err error) { - if err != nil { - log.Fatal(err) - } -} - -func main() { - if updatedAtTimestamp.After(cachedFileTimestamp) { - } else { - log.Printf("Bulk data has not been updated. Skipping download.") - } - - var allCards []types.Card - allCardsBytes, err := ioutil.ReadFile(ALL_CARDS_CACHE_FILENAME) - check(err) - - err = json.Unmarshal(allCardsBytes, &allCards) - check(err) - - operations.InsertCards(db, allCards) -}