fix issues

Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
yxxhero 2024-02-12 09:06:11 +08:00
parent c3a1c5ebe9
commit 21ae1f5b2b
1 changed files with 2 additions and 1 deletions

View File

@ -129,7 +129,8 @@ func Parse(goGetterSrc string) (*Source, error) {
if len(pathComponents) != 2 { if len(pathComponents) != 2 {
if strings.HasSuffix(u.Path, ".git") { if strings.HasSuffix(u.Path, ".git") {
pathComponents = []string{u.Path, ""} dir := u.Path[1:]
pathComponents = []string{dir, ""}
} else { } else {
dir := filepath.Dir(u.Path) dir := filepath.Dir(u.Path)
if len(dir) > 0 { if len(dir) > 0 {