An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

github.com/masterminds/vcs

Package vcs provides the ability to work with varying version control systems (VCS), also known as source control systems (SCM) though the same interface. This package includes a function that attempts to detect the repo type from the remote URL and return the proper type. For example, In this case repo will be a GitRepo instance. NewRepo can detect the VCS for numerous popular VCS and from the URL. For example, a URL ending in .git that's not from one of the popular VCS will be detected as a Git repo and the correct type will be returned. If you know the repository type and would like to create an instance of a specific type you can use one of constructors for a type. They are NewGitRepo, NewSvnRepo, NewBzrRepo, and NewHgRepo. The definition and usage is the same as NewRepo. Once you have an object implementing the Repo interface the operations are the same no matter which VCS you're using. There are some caveats. For example, each VCS has its own version formats that need to be respected and checkout out branches, if a branch is being worked with, is different in each VCS.

Ecosystem
proxy.golang.org
Latest Release
v1.13.3
almost 4 years ago
Versions
12
Links
Registry proxy.golang.org
Source Repository
Docs Documentation
JSON API View JSON
CodeMeta codemeta.json
Package Details
PURL pkg:golang/github.com/masterminds/vcs
spec
License MIT
Namespace github.com/masterminds
First Release over 9 years ago
Last Synced about 18 hours ago
Keywords
bzr git go golang hg scm svn vcs
Repository
Stars 190 on GitHub
Forks 62 on GitHub
Docker Dependents 1
Docker Downloads 826,858
Rankings on proxy.golang.org
Overall Top 5.1%
Forks Top 1.9%