title: Is this a reasonable and idiomatic GoLang circular shift implementation?
body: <p>Can anyone comment on whether this is a reasonable and idiomatic way of implementing <a href="https://en.wikipedia.org/wiki/Circular_shift" rel="nofollow">circular shift</a> of integer arrays in Go? (I deliberately chose not to use bitwise operations.)</p>
  
  <p>How could it be improved?</p>
  
  <pre><code>package main
  
  import "fmt"
  
  func main() {
      a := []int{1,2,3,4,5,6,7,8,9,10}
      fmt.Println(a)
      rotateR(a, 5)
      fmt.Println(a)
      rotateL(a, 5)
      fmt.Println(a)
  }
  
  func rotateL(a []int, i int) {
      for count := 1; count &lt;= i; count++ {
          tmp := a[0]
          for n := 1;n &lt; len(a);n++ {
              a[n-1] = a[n]
          }
          a[len(a)-1] = tmp
      }
  }
  
  func rotateR(a []int, i int) {
      for count := 1; count &lt;= i; count++ {
          tmp := a[len(a)-1]
          for n := len(a)-2;n &gt;=0 ;n-- {
              a[n+1] = a[n]
          }
          a[0] = tmp
      }
  }
  </code></pre>