remove extraneous call to TrimSuffix

This commit is contained in:
David 2020-12-07 19:21:17 -05:00
parent 0f15711b6a
commit dd8eb8c1f8

View File

@ -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