6
0
mirror of https://github.com/grdl/git-get.git synced 2026-02-07 16:59:16 +00:00

Rename git package to repo package

This commit is contained in:
Grzegorz Dlugoszewski
2020-06-18 14:16:59 +02:00
parent da8f0931d0
commit 8511cd6c97
12 changed files with 65 additions and 65 deletions

View File

@@ -3,8 +3,8 @@ package main
import (
"fmt"
"git-get/pkg/cfg"
"git-get/pkg/git"
"git-get/pkg/path"
"git-get/pkg/repo"
"os"
pathpkg "path"
@@ -45,7 +45,7 @@ func Run(cmd *cobra.Command, args []string) {
for _, opt := range opts {
path := pathpkg.Join(root, path.URLToPath(opt.URL))
opt.Path = path
_, _ = git.CloneRepo(opt)
_, _ = repo.Clone(opt)
}
os.Exit(0)
}
@@ -56,13 +56,13 @@ func Run(cmd *cobra.Command, args []string) {
branch := viper.GetString(cfg.KeyBranch)
path := pathpkg.Join(root, path.URLToPath(url))
cloneOpts := &git.CloneOpts{
cloneOpts := &repo.CloneOpts{
URL: url,
Path: path,
Branch: branch,
}
_, err = git.CloneRepo(cloneOpts)
_, err = repo.Clone(cloneOpts)
exitIfError(err)
}