// Command gbrgames validates the game templates in this repo and imports them from a panel export. // // go run ./cmd/gbrgames validate # check every games//game.yaml (+ test.yaml) // go run ./cmd/gbrgames import export.json # write games// from GET /api/v1/admin/games package main import ( "fmt" "os" ) func main() { if len(os.Args) < 2 { usage() } var err error switch os.Args[1] { case "validate": err = runValidate(os.Args[2:]) case "import": err = runImport(os.Args[2:]) default: usage() } if err != nil { fmt.Fprintln(os.Stderr, "error:", err) os.Exit(1) } } func usage() { fmt.Fprintln(os.Stderr, "usage: gbrgames validate [-games DIR] | import [-games DIR] [-all] EXPORT.json") os.Exit(2) }