从git clone地址中获取repo的名称
(repoUrl string)
| 718 | |
| 719 | // 从git clone地址中获取repo的名称 |
| 720 | func GetRepoName(repoUrl string) string { |
| 721 | index := strings.LastIndex(repoUrl, "/") |
| 722 | return strings.Replace(repoUrl[index+1:], ".git", "", -1) |
| 723 | } |
| 724 | |
| 725 | // 执行ssh command,在session模式下,standard output 只能在执行结束的时候获取到 |
| 726 | func (instance *SSHRemote) ExeSSHCommand(sshCommand string) (outContent string, err error) { |
no outgoing calls
no test coverage detected