Say you have a slice (a) of size 1. a[0:] return a slice of size 1. a[1:] return a slice of size 0. a[2:] panics.

Code is here

Advertisements