-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathmain.go
33 lines (30 loc) · 967 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
// Clone down and replicate goof-type repositories to create a
// valid demo ecosystem for Snyk. This application will recursively
// download repositories defined in repolist.txt and automatically
// create personal clones of each repository in each of Snyk's
// supported upstream SCMs: GitHub, GitLab, Bitbucket, and Azure.
// This application will also keep each repository up to date and
// synced with the upstream original.
package main
import (
"log"
)
// Main function to execute the processes sub-processes of the app.
func main() {
// Create a map of the repository name and location to be utilized
// by the rest of the app functions.
repos, err := parseRepoList("repolist.txt")
if err != nil {
log.Panic(err)
}
// Clone or pull original remote repositories.
err = cloneRepos(repos)
if err != nil {
log.Panic(err)
}
// Create or update personal remote repositories.
err = createRemoteRepos(repos)
if err != nil {
log.Panic(err)
}
}