Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 10df566

Browse files
committed
bugfix,避免 panic
1 parent ee46383 commit 10df566

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/logic/project.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,8 +434,10 @@ func (ProjectLogic) ParseOneProject(projectUrl string) error {
434434

435435
if strings.HasPrefix(project.Src, "https://github.com/") {
436436
project.Repo = project.Src[len("https://github.com/"):]
437-
} else {
437+
} else if strings.HasPrefix(project.Src, "https://gitee.com/") {
438438
project.Repo = project.Src[len("https://gitee.com/"):]
439+
} else {
440+
return nil
439441
}
440442

441443
pos := strings.Index(project.Repo, "/")

0 commit comments

Comments
 (0)