JOJ3/cmd/sample/main.go
张泊明518370910136 a9a829da3f
Some checks failed
build-image / create-empty-commit (push) Failing after 4s
checks / build (push) Successful in 1m20s
feat: rename module
2024-09-30 17:38:40 -04:00

27 lines
408 B
Go

package main
import (
"encoding/json"
"flag"
"fmt"
"os"
"focs.ji.sjtu.edu.cn/git/JOJ/JOJ3/pkg/sample"
)
func main() {
score := flag.Int("score", 0, "score")
flag.Parse()
res, err := sample.Run(sample.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)
}