From 16ff0328cdd72bdc8e603aa9e20f4db54812add4 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Fri, 25 Feb 2022 23:23:59 -0500 Subject: [PATCH] fix: also support KB, MB, GB, and B as valid suffixes --- plugins/resource/functions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/resource/functions.go b/plugins/resource/functions.go index 31c8d6775..20369fae1 100644 --- a/plugins/resource/functions.go +++ b/plugins/resource/functions.go @@ -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