-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
47 lines (43 loc) · 969 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package main
import (
"log"
"os"
"github.com/bitbomdev/scorecard-downloader/cmd"
"github.com/urfave/cli/v2"
)
func main() {
app := &cli.App{
Name: "scorecard-downloader",
Usage: "Download and process scorecard data for GitHub repositories",
Flags: []cli.Flag{
&cli.StringSliceFlag{
Name: "purls",
Usage: "PURLs of the repositories to process",
Required: false,
},
&cli.StringFlag{
Name: "purls-file",
Usage: "File containing PURLs, one per line",
Required: false,
},
&cli.StringFlag{
Name: "output",
Usage: "Output file name (default: results.json)",
Value: "results.json",
},
&cli.BoolFlag{
Name: "use-bigquery",
Usage: "Use BigQuery instead of the Scorecard API",
},
&cli.StringFlag{
Name: "credentials-file",
Usage: "Path to the BigQuery credentials file",
},
},
Action: cmd.Run,
}
err := app.Run(os.Args)
if err != nil {
log.Fatal(err)
}
}