26 lines
400 B
Go
26 lines
400 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"log"
|
||
|
"sevenkeys/database"
|
||
|
"sevenkeys/database/operations"
|
||
|
"sevenkeys/scryfall/methods"
|
||
|
)
|
||
|
|
||
|
func check(err error) {
|
||
|
if err != nil {
|
||
|
log.Fatal(err)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func main() {
|
||
|
sets, err := methods.GetSets()
|
||
|
check(err)
|
||
|
|
||
|
db := database.GetDatabaseFromConfig("config.json")
|
||
|
err = operations.InsertOrUpdateSets(db, sets)
|
||
|
check(err)
|
||
|
|
||
|
// Download icon files to cache/ directory
|
||
|
}
|