package main import ( "bufio" "fmt" "os" "aoc2022/day01/common" ) func main() { inventories := common.Parse(*bufio.NewScanner(os.Stdin)) largestInventoryTotal := 0 for _, inventory := range inventories { currentTotal := inventory.GetTotal() if currentTotal > largestInventoryTotal { largestInventoryTotal = currentTotal } } fmt.Println(largestInventoryTotal) }