From ec319aec119695f80a55fd4911fc063b5250da81 Mon Sep 17 00:00:00 2001 From: xihuwenhua Date: Wed, 2 Oct 2024 16:57:14 +0800 Subject: [PATCH] fix: fix slice init length --- .../app/pipeline/configure/BuildPipelineRestHandler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/restHandler/app/pipeline/configure/BuildPipelineRestHandler.go b/api/restHandler/app/pipeline/configure/BuildPipelineRestHandler.go index 1ae6d4f33d..fa7936e93f 100644 --- a/api/restHandler/app/pipeline/configure/BuildPipelineRestHandler.go +++ b/api/restHandler/app/pipeline/configure/BuildPipelineRestHandler.go @@ -532,7 +532,7 @@ func (handler *PipelineConfigRestHandlerImpl) checkCiPatchAccess(token string, r } appId := 0 - envIds := make([]int, len(cdPipelines)) + envIds := make([]int, 0, len(cdPipelines)) for _, cdPipeline := range cdPipelines { envIds = append(envIds, cdPipeline.EnvironmentId) appId = cdPipeline.AppId