fix: also support KB, MB, GB, and B as valid suffixes

This commit is contained in:
Jose Diaz-Gonzalez
2022-02-25 23:23:59 -05:00
parent 068b3c9adb
commit 16ff0328cd

View File

@@ -10,7 +10,7 @@ import (
func addMemorySuffixForDocker(key string, value string) string {
if key == "memory" {
hasSuffix := false
suffixes := []string{"b", "k", "m", "g"}
suffixes := []string{"b", "k", "m", "g", "KB", "MB", "GB"}
for _, suffix := range suffixes {
if strings.HasSuffix(value, suffix) {
hasSuffix = true