6
0
mirror of https://github.com/grdl/git-get.git synced 2026-02-06 15:07:57 +00:00

Add go modules and instructions for static building

This commit is contained in:
Grzegorz Dlugoszewski
2020-05-16 14:10:35 +02:00
parent 653873c238
commit 30205fbbdf
4 changed files with 62 additions and 0 deletions

22
git-get.go Normal file
View File

@@ -0,0 +1,22 @@
package main
import (
"github.com/libgit2/git2go/v30"
)
import "fmt"
func main() {
options := &git.CloneOptions{
CheckoutOpts: nil,
FetchOptions: nil,
Bare: false,
CheckoutBranch: "",
RemoteCreateCallback: nil,
}
repo, err := git.Clone("https://gitlab.com/grdl/dotfiles.git", "/tmp/dotfiles/", options)
if err != nil {
panic(err.Error())
}
fmt.Println(repo.IsBare())
}