From 007dac6c33ee1b77b8a779aa66c27ce4f7c6c1d0 Mon Sep 17 00:00:00 2001 From: zouap Date: Fri, 18 Nov 2022 15:31:08 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=94=B9=E7=89=88=E6=96=B0?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- services/repository/repository.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/services/repository/repository.go b/services/repository/repository.go index 1b3a2ecad..d4b0072e1 100644 --- a/services/repository/repository.go +++ b/services/repository/repository.go @@ -119,13 +119,12 @@ func GetRecommendRepoFromPromote(filename string) ([]map[string]interface{}, err //resultRepo := make([]*models.Repository, 0) for _, repoName := range result { - tmpIndex1 := strings.Index(repoName, "##") - log.Info("repoName=" + repoName + " tmpIndex1=" + fmt.Sprint(tmpIndex1) + " len(repoName)=" + fmt.Sprint(len(repoName))) + //log.Info("repoName=" + repoName + " tmpIndex1=" + fmt.Sprint(tmpIndex1) + " len(repoName)=" + fmt.Sprint(len(repoName))) repoLabel := "" if tmpIndex1 != -1 { - repoName := strings.Trim(repoName[0:tmpIndex1], " ") repoLabel = strings.Trim(repoName[tmpIndex1+2:], " ") + repoName = strings.Trim(repoName[0:tmpIndex1], " ") } tmpIndex := strings.Index(repoName, "/") if tmpIndex == -1 {