add build targets

This commit is contained in:
Christian Nieves
2023-07-12 21:40:39 -05:00
parent 28fae2c39d
commit 4060a5c274
5 changed files with 36 additions and 33 deletions

View File

@ -5,26 +5,26 @@ import (
"fmt"
"io/ioutil"
"os"
"github.com/squk/lotr/extract/types"
"github.com/davecgh/go-spew/spew"
"github.com/squk/lotr/cmd/beornextract/types"
)
func main() {
fmt.Println("LOTR CARD PARSE")
// Open our jsonFile
jsonFile, err := os.Open("./data/Bot.Cards.json")
// if we os.Open returns an error then handle it
if err != nil {
fmt.Println(err)
return
}
fmt.Println("Successfully Opened users.json")
// defer the closing of our jsonFile so that we can parse it later on
defer jsonFile.Close()
jsonFile, err := os.Open("./data/Bot.Cards.json")
// if we os.Open returns an error then handle it
if err != nil {
fmt.Println(err)
return
}
fmt.Println("Successfully Opened users.json")
// defer the closing of our jsonFile so that we can parse it later on
defer jsonFile.Close()
byteValue, _ := ioutil.ReadAll(jsonFile)
byteValue, _ := ioutil.ReadAll(jsonFile)
c := []types.HallOfBeornCard{}
json.Unmarshal(byteValue, &c)
spew.Dump(c)