From 40dca692980c2ac7de72f401a88824bea7e43139 Mon Sep 17 00:00:00 2001 From: Guangming Wang Date: Wed, 16 Oct 2019 21:37:28 +0800 Subject: [PATCH] fix string trim func in main Signed-off-by: Guangming Wang --- hack/machine_types/machine_types.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/machine_types/machine_types.go b/hack/machine_types/machine_types.go index fde4d00cb9..f4f867de67 100644 --- a/hack/machine_types/machine_types.go +++ b/hack/machine_types/machine_types.go @@ -177,7 +177,7 @@ func run() error { Cores: stringToInt(attributes["vcpu"]), } - memory := strings.TrimRight(attributes["memory"], " GiB") + memory := strings.TrimSuffix(attributes["memory"], " GiB") machine.MemoryGB = stringToFloat32(memory) if attributes["storage"] != "EBS only" {