If the interval [0, n) is empty, math.Intn(n) returns 0, which is not in the interval.
I'd prefer a panic("math.Intn(non-positive integer)"), but even changing the
documentation would be better. E.g., "If the interval is empty the result is not
defined, or there might be a panic."