From 957499e4d7c4f7795f3ee1a01f9f73a49ecf34f7 Mon Sep 17 00:00:00 2001 From: zhengkunwang223 <31820853+zhengkunwang223@users.noreply.github.com> Date: Fri, 2 Jun 2023 17:45:24 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E5=BA=94=E7=94=A8?= =?UTF-8?q?=E5=86=85=E5=AD=98=E9=99=90=E5=88=B6=E5=9B=9E=E6=98=BE=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E7=9A=84=E9=97=AE=E9=A2=98=20(#1237)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/service/app_utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/app/service/app_utils.go b/backend/app/service/app_utils.go index f96418798..5e7bd2256 100644 --- a/backend/app/service/app_utils.go +++ b/backend/app/service/app_utils.go @@ -900,7 +900,7 @@ func getAppCommonConfig(envs map[string]interface{}) request.AppContainerConfig config.CpuQuota = 0 } if memLimit, ok := envs[constant.MemoryLimit]; ok { - re := regexp.MustCompile(`(\d+(?:\.\d+)?)\s*([KMGT]?B)`) + re := regexp.MustCompile(`(\d+)([A-Za-z]+)`) matches := re.FindStringSubmatch(memLimit.(string)) if len(matches) == 3 { num, err := strconv.ParseFloat(matches[1], 64)