cloning a repo with os.exec(“git”, “clone”)

var repo = "https://github.com/username/mysuperrepo.git"
cmd := exec.Command("git", "clone", repo)
err := cmd.Run()
if err != nil {
    // something went wrong
}
https://stackoverflow.com/questions/34867203/cloning-a-repo-with-os-execgit-clone

Share and Enjoy !

0Shares
0 0