I have a slice in golang, say [1 2 3 4 5 6 7 8 9 10], and I would like to efficiently shift the values to different indexes such as a shift of 5 would yield [6 7 8 9 10 1 2 3 4 5].
I have come up with a solution below, but wondering if there is a built-in or better way to accomplish this?