init org user scan work

This commit is contained in:
zricethezav committed 2018-02-18 12:03:46 -06:00
1 parent c8181dee1b
commit a77b6e4f8b
3 files changed
+97 -9

No files matched your search

+4 -3
View File
@@ -14,20 +14,21 @@ import (
"syscall"
)
// LeakElem contains the line and commit of a leak
type LeakElem struct {
Line string `json:"line"`
Commit string `json:"commit"`
}
func start(_ *Options, repoURL string) {
func start(opts *Options) {
c := make(chan os.Signal, 2)
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
err := exec.Command("git", "clone", repoURL).Run()
err := exec.Command("git", "clone", opts.RepoURL).Run()
if err != nil {
log.Fatalf("failed to clone repo %v", err)
}
repoName := getLocalRepoName(repoURL)
repoName := getLocalRepoName(opts.RepoURL)
if err = os.Chdir(repoName); err != nil {
log.Fatal(err)
}