mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-11-11 01:23:31 +08:00
fix: 解决应用内存限制回显失败的问题 (#1237)
This commit is contained in:
parent
3773d64aa7
commit
957499e4d7
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue