|
|
1 jaar geleden | |
|---|---|---|
| .. | ||
| .gitignore | 1 jaar geleden | |
| .golangci.yml | 1 jaar geleden | |
| CHANGELOG.md | 1 jaar geleden | |
| LICENSE.txt | 1 jaar geleden | |
| Makefile | 1 jaar geleden | |
| README.md | 1 jaar geleden | |
| bzr.go | 1 jaar geleden | |
| errors.go | 1 jaar geleden | |
| git.go | 1 jaar geleden | |
| git_unix.go | 1 jaar geleden | |
| git_windows.go | 1 jaar geleden | |
| hg.go | 1 jaar geleden | |
| repo.go | 1 jaar geleden | |
| svn.go | 1 jaar geleden | |
| vcs_local_lookup.go | 1 jaar geleden | |
| vcs_remote_lookup.go | 1 jaar geleden | |
Manage repos in varying version control systems with ease through a common interface.
Note: Module names are case sensitive. Please be sure to use github.com/Masterminds/vcs with the capital M.
Quick usage:
remote := "https://github.com/Masterminds/vcs"
local, _ := ioutil.TempDir("", "go-vcs")
repo, err := NewRepo(remote, local)
In this case NewRepo will detect the VCS is Git and return a GitRepo. All of
the repos implement the Repo interface with a common set of features between
them.
Git, SVN, Bazaar (Bzr), and Mercurial (Hg) are currently supported. They each
have their own type (e.g., GitRepo) that follow a simple naming pattern. Each
type implements the Repo interface and has a constructor (e.g., NewGitRepo).
The constructors have the same signature as NewRepo.
For more details see the documentation.
The package golang.org/x/tools/go/vcs provides some valuable functionality
for working with packages in repositories in varying source control management
systems. That package, while useful and well tested, is designed with a specific
purpose in mind. Our uses went beyond the scope of that package. To implement
our scope we built a package that went beyond the functionality and scope
of golang.org/x/tools/go/vcs.