在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:speedata/gogit开源软件地址:https://github.com/speedata/gogit开源编程语言:Go 76.6%开源软件介绍:gogitThis repository is not maintained anymore and archived. Original README (the site is not available anymore) follows: Pure Go read access to a git repository. State: Not really actively maintained, but used in production site. Without warranty, of course. ExampleSample application to list the latest directory (recursively): package main
import (
"github.com/speedata/gogit"
"log"
"os"
"path"
"path/filepath"
)
func walk(dirname string, te *gogit.TreeEntry) int {
log.Println(path.Join(dirname, te.Name))
return 0
}
func main() {
wd, err := os.Getwd()
if err != nil {
log.Fatal(err)
}
repository, err := gogit.OpenRepository(filepath.Join(wd, "src/github.com/speedata/gogit/_testdata/testrepo.git"))
if err != nil {
log.Fatal(err)
}
ref, err := repository.LookupReference("HEAD")
if err != nil {
log.Fatal(err)
}
ci, err := repository.LookupCommit(ref.Oid)
if err != nil {
log.Fatal(err)
}
ci.Tree.Walk(walk)
} Sample applicationWe use The git repository is around 500 GB (May 2017) and dates back to 2013. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论