From dd8eb8c1f8bfb4e6a1fabd8e6dd261bf4fe1f462 Mon Sep 17 00:00:00 2001 From: David Ashby Date: Mon, 7 Dec 2020 19:21:17 -0500 Subject: [PATCH] remove extraneous call to TrimSuffix --- 07/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/07/main.go b/07/main.go index 065d630..cd33df0 100644 --- a/07/main.go +++ b/07/main.go @@ -31,7 +31,7 @@ func parseLine(s string) (string, map[string]int) { result := map[string]int{} for _, b := range contained { // strip off the bags?\.? and split on spaces - innerBag := strings.Split(strings.TrimSuffix(strings.TrimRight(b, "s."), " bag"), " ") + innerBag := strings.Split(strings.TrimRight(b, "bags."), " ") // parse the count i, _ := strconv.Atoi(innerBag[0]) result[innerBag[1]+" "+innerBag[2]] = i