Skip to content

Commit 19fcf05

Browse files
authored
Merge pull request #23 from jianxiaoguo/main
fix(limits): set command parse params
2 parents 20d2867 + 9237c28 commit 19fcf05

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

parser/limits.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,12 @@ Use 'drycc help [command]' to learn more.
112112
memoryLimits := []string{}
113113
for _, value := range args["<type>=<value>"].([]string) {
114114
if args["--cpu"].(bool) {
115-
isCPU, _ := regexp.MatchString("^\\d+m?$", value)
115+
isCPU, _ := regexp.MatchString("\\d+m?$", value)
116116
if isCPU {
117117
cpuLimits = append(cpuLimits, value)
118118
}
119119
}
120-
isMemory, _ := regexp.MatchString("^\\d+[M|G]$", value)
120+
isMemory, _ := regexp.MatchString("\\d+[M|G]$", value)
121121
if isMemory {
122122
memoryLimits = append(memoryLimits, value)
123123
}

0 commit comments

Comments
 (0)