INNER CODE UNIT · Go
main
cozystack/cozystack · cmd/api-gate/main.go:44
func main() {
baseDir := flag.String("base", "", "path to the base (merge-base) repository checkout")
headDir := flag.String("head", "", "path to the head (PR) repository checkout")
format := flag.String("format", "markdown", "report format: markdown or text")
flag.Parse()
if *baseDir == "" || *headDir == "" {
fmt.Fprintln(os.Stderr, "api-gate: both --base and --head are required")
flag.Usage()
os.Exit(1)
}
base, err := apigate.LoadSnapshot(*baseDir)
if err != nil {
fmt.Fprintf(os.Stderr, "api-gate: loading base snapshot: %v\n", err)
os.Exit(1)
}
head, err := apigate.LoadSnapshot(*headDir)