JOJ3/cmd/dummy/main.go
张泊明518370910136 27a1e4420e
All checks were successful
continuous-integration/drone/push Build is passing
feat: dummy binary + parser example
2024-03-12 16:22:21 -04:00

27 lines
410 B
Go

package main
import (
"encoding/json"
"flag"
"fmt"
"os"
"focs.ji.sjtu.edu.cn/git/FOCS-dev/JOJ3/pkg/dummy"
)
func main() {
score := flag.Int("score", 0, "score")
flag.Parse()
res, err := dummy.Run(dummy.Conf{Score: *score})
if err != nil {
fmt.Fprint(os.Stderr, err)
os.Exit(1)
}
b, err := json.Marshal(res)
if err != nil {
fmt.Fprint(os.Stderr, err)
os.Exit(1)
}
fmt.Printf("%s", b)
}