-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
55 lines (50 loc) · 973 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
48
49
50
51
52
53
54
55
package main
import (
"CIAnalyser/config"
"CIAnalyser/pkg/analyzer"
"CIAnalyser/pkg/contributor"
"CIAnalyser/pkg/credential"
"CIAnalyser/pkg/model"
"CIAnalyser/pkg/repo"
"CIAnalyser/pkg/script"
"CIAnalyser/pkg/verified"
"fmt"
"os"
)
func main() {
// initialize configurations
config.Init()
// initialize models
model.Init()
if len(os.Args) < 2 {
panic("require an argument")
}
switch os.Args[1] {
case "index-repo":
repo.Index()
case "clone-repo":
repo.Clone()
case "extract-script":
script.Extract()
case "clone-script":
script.Clone()
case "categorize-script":
script.Categorize()
case "crawl-contributor":
contributor.Crawl()
case "crawl-verified":
verified.Crawl()
case "extract-credential":
credential.Extract()
case "label-usage":
script.Label()
case "label-lag":
script.Lag()
case "parse-using":
script.ParseUsing()
case "analyze":
analyzer.Analyze()
default:
fmt.Println("not a valid stage code")
}
}