Merge pull request #626 from monopole/fix616

Fix incorrect use of filepath.Separator
This commit is contained in:
Kubernetes Prow Robot
2018-12-13 16:45:27 -08:00
committed by GitHub

View File

@@ -119,11 +119,11 @@ func parseGithubUrl(n string) (
if strings.HasSuffix(n, ".git") {
n = n[0 : len(n)-len(".git")]
}
i := strings.Index(n, string(filepath.Separator))
i := strings.Index(n, "/")
if i < 1 {
return "", "", "", "", errors.New("no separator")
}
j := strings.Index(n[i+1:], string(filepath.Separator))
j := strings.Index(n[i+1:], "/")
if j >= 0 {
j += i + 1
repo = n[:j]