title: Efficient way to rotate a slice in golang
body: <p>I need a function to efficiently reverse a slice in golang. (My concrete need is to reverse the prefix of a []byte).</p>
  
  <p>I checked the example from <a href="http://golang.org/doc/effective_go.html#for" rel="nofollow">Effective Go</a> with <code>objdump -Sd</code> and a lot of boiler plate is generated to check for array indexes. Even the swap is too inefficient.</p>