Go has one looping keyword, for. Its condition, index and range forms cover the work that other languages split across several keywords. An accumulator starts with a value that makes sense for an empty input. A sum starts at zero, but a maximum may need a separate found flag because every value could be negative. In a range loop over a slice, the first value is an index and the second is an element. Mixing them up often produces plausible results on a short example. These exercises use dispatch counts and inspection readings. Trace the first iteration and the final iteration, then test the empty case. A correct loop must stop and return the same result even when an item appears twice.
Negative corrections reduce the total.