增加拉取git仓库的方法
This commit is contained in:
parent
e1935738dc
commit
c42fac5134
15
git.go
15
git.go
@ -175,3 +175,18 @@ func (g *git) ConfigAuthor(name string, email string) *define.Result {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Clone 拉取 git 仓库代码
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 14:03 2022/6/27
|
||||
func (g *git) Clone(repo string, saveDir string) *define.Result {
|
||||
param := []string{
|
||||
repo,
|
||||
}
|
||||
if len(saveDir) > 0 {
|
||||
param = append(param, saveDir)
|
||||
}
|
||||
return Execute(g.workDir, g.gitCmdPath, param)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user