you are viewing a single comment's thread
view the rest of the comments
[–] 2 points 3 months ago*

tl;dr arr[len(arr)] is wrong; arr[len(arr)-1] is right because Go uses zero-based indexes like a bunch of other languages.

  • source