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:
22
git-get.go
Normal file
22
git-get.go
Normal 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())
|
||||
}
|
||||
Reference in New Issue
Block a user