コード例 #1
0
ファイル: clone_update.go プロジェクト: shazow/go-vcs
func init() {
	// Overwrite the git cloner to use the faster libgit2
	// implementation.
	vcs.RegisterCloner("git", func(url, dir string, opt vcs.CloneOpt) (vcs.Repository, error) {
		return Clone(url, dir, opt)
	})
}
コード例 #2
0
ファイル: repo.go プロジェクト: alexsaveliev/go-vcs
func init() {
	vcs.RegisterOpener("hg", func(dir string) (vcs.Repository, error) {
		return Open(dir)
	})
	vcs.RegisterCloner("hg", func(url, dir string, opt vcs.CloneOpt) (vcs.Repository, error) {
		return CloneHgRepository(url, dir, opt)
	})
}